Re: [PATCH] 2.0.3 showstopper, broken pxelinux files
by Gordon Child
I actually reported this and fixed it with a patch last week (Feb 8).
However, i think Peter's patch is a little cleaner. I didnt know what
the change in the function would break so I made it into a very
specific condition.
My patch is at:
branch kopt_flatten_dict_err at
http://github.com/gordonchil/cobbler.git
-Gordon
On Feb 15, 2010, at 11:13 AM, Scott Henson <shenson(a)redhat.com> wrote:
> Excerpts from Vreman, Peter's message of Mon Feb 15 03:55:28 -0500 2010
> :
>> The change to isinstance breaks the generation of the kernel
>> commandline. The pxelinux files contain the dictionary instead of
>> the string:
>>
>> append initrd=/images/RHEL4.8/initrd.img {'ksdevice':
>> 'bootif', 'lang': ' ', 'kssendmac': None, 'text': None}
>>
>> The patch below fixes the isintance check:
>>
>> http://github.com/pvreman/cobbler/commit/1a42e87b2b58354f0b874c9d6f1cdbef...
>
> /me gets his paper bag
>
> 2.0.3.1 coming down the pipe in a bit.
> --
> Scott Henson
> Red Hat CIS Operator
> WVU Alum BSAE/BSME
> _______________________________________________
> cobbler-devel mailing list
> cobbler-devel(a)lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/cobbler-devel
14 years, 2 months
[PATCH] 2.0.3 showstopper, broken pxelinux files
by Vreman, Peter
The change to isinstance breaks the generation of the kernel commandline. The pxelinux files contain the dictionary instead of the string:
append initrd=/images/RHEL4.8/initrd.img {'ksdevice': 'bootif', 'lang': ' ', 'kssendmac': None, 'text': None}
The patch below fixes the isintance check:
http://github.com/pvreman/cobbler/commit/1a42e87b2b58354f0b874c9d6f1cdbef...
Regards,
Peter
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
14 years, 2 months
cobblerd fails to start when kernel or initrd are removed
by Vreman, Peter
The cobblerd aborts with an exception if a kernel or initrd is removed. This comes from the fact that the distro's are loaded from disk and also the validation code is run.
The problem is that without a running cobblerd it is not possible to remove a distro cleanly. The only hack around it is to delete the .json file with the risk to break profiles and systems.
The source of the problem is the collections.add() function. This function is made too generic to be used for multiple cases:
- Load from disk
- Save to disk
- Add new system
- Update system
But all 4 actions have different kind of checks and triggers points.
My proposal is to refactor the collection.add() function to split it into multiple methods. Some part of the triggers, duplication checks can then also move to the corresponding collection_*.py code. E.g. the IP duplication check to a virtual method in collection_system.py
Shall I create a patch for this?
Regards,
Peter
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
14 years, 2 months
[PATCH] cobbler-ext-nodes use http_port
by Vreman, Peter
Cobbler-ext-nodes scripts needs also to use http_port to support cobbler running on a different port than 80.
Patch available at: http://github.com/pvreman/cobbler/commit/29d03fb3009b1267e86d6f56e8290883...
Regards,
Peter
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
14 years, 2 months
Cobbler 2.0.3 Release
by Scott Henson
I just finished putting together the Cobbler 2.0.3 release. This is a
bug fix release. Please test. I'll announce it to the user list once
I get a chance to test the resultant RPMs. Thanks.
--
Scott Henson
Red Hat CIS Operator
WVU Alum BSAE/BSME
14 years, 2 months
you have multiple network devices...
by Gordon Child
I just updated my install to master. I'm receiving a new message when trying to kickstart...
"You have multiple network devices on this system. Which one do you want to install through?"
With the option to select the boot device.
I've read through a few forum posts out there and it looks like you resolve this by utilizing ksdevice=bootif or ksdevice=eth0 as a kernel option. I've done this and verified that they are updated in the pxelinux.cfg/*macaddr* files, but this doesn't seem to fix the problem.
Has anyone else ran into this issue?
-Gordon Child
14 years, 2 months
tests in remote.py
by Vreman, Peter
I see that new tests are added to apitests/. Is there still a reason to keep the unit tests in remote.py?
Peter
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
14 years, 2 months
Proposed Cobbler 2.0.3
by Scott Henson
I've pushed a few changes up to master on fedora hosted. It should
contain everything my terrible memory has on things that were
requested for 2.0.3. If anyone has anything that they would really
like to see in 2.0.3, let me know before Monday 12pm EST. If you have
a patch I'll probably include it. If not, I'll see if I can get one
together before then.
Let me know. Thanks.
--
Scott Henson
Red Hat CIS Operator
WVU Alum BSAE/BSME
14 years, 2 months
[PATCH] #566 fix cobbler replicate so that it creates distro symlinks
by Jonathan Sabo
I noticed that when I replicated from a master to a master and tried to go
in the reverse direction I didn't have all the same distro rsync repos on
the second master so the replication in the reverse direction failed. I
asked on irc and shenson said...
<shenson> need to put link_distro from contrib/cobbler_sync_master into
utils and then call it from both places
Here's a patch that fixed it for me...
# git diff HEAD
diff --git a/cobbler/action_replicate.py b/cobbler/action_replicate.py
index 1b75755..bfdab6f 100644
--- a/cobbler/action_replicate.py
+++ b/cobbler/action_replicate.py
@@ -159,6 +159,7 @@ class Replicate:
if not os.path.isdir(parentdir):
os.makedirs(parentdir)
self.rsync_it("distro-%s"%distro["name"], dest)
+
self.logger.info("Rsyncing repos")
for repo in self.must_include["repo"].keys():
if self.must_include["repo"][repo] == 1:
@@ -182,6 +183,13 @@ class Replicate:
self.replace_objects_newer_on_remote(what)
+ def link_distros(self):
+
+ for distro in self.api.distros():
+ self.logger.debug("Linking Distro %s" % distro.name)
+ utils.link_distro(self.settings, distro)
+
+
def generate_include_map(self):
self.remote_names = {}
@@ -304,6 +312,7 @@ class Replicate:
self.local.ping()
self.replicate_data()
+ self.link_distros()
self.logger.info("Syncing")
self.api.sync()
self.logger.info("Done")
diff --git a/cobbler/utils.py b/cobbler/utils.py
index 50e0f19..67f243c 100644
--- a/cobbler/utils.py
+++ b/cobbler/utils.py
@@ -1876,6 +1876,24 @@ def dhcpconf_location(api):
else:
return "/etc/dhcp/dhcpd.conf"
+def link_distro(settings, distro):
+ # find the tree location
+ dirname = os.path.dirname(distro.kernel)
+ tokens = dirname.split("/")
+ tokens = tokens[:-2]
+ base = "/".join(tokens)
+ dest_link = os.path.join(settings.webdir, "links", distro.name)
+
+ # create the links directory only if we are mirroring because with
+ # SELinux Apache can't symlink to NFS (without some doing)
+
+ if not os.path.exists(dest_link):
+ try:
+ os.symlink(base, dest_link)
+ except:
+ # this shouldn't happen but I've seen it ... debug ...
+ print _("- symlink creation failed: %(base)s, %(dest)s") % {
"base" : base, "dest" : dest_link }
+
if __name__ == "__main__":
print os_release() # returns 2, not 3
14 years, 3 months
[PATCH] WebUI xmlrpc issues with python 2.3 (RHEL4)
by Vreman, Peter
Python 2.3 doesn't support None and Unicode dictionary keys on XMLRPC
In the cobblerd this is already resolved. But in the WebUI this not done yet.
This patch adds utils.strip_none() calls to prevent this in the WebUI views.py.
Patch available from: http://github.com/pvreman/cobbler/commit/2fb5eb4f4dee8639c68410f64bc0f376...
Regards,
Peter
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
14 years, 3 months