From swissslinky at gmail.com Sun Jun 1 17:33:58 2008 From: swissslinky at gmail.com (Slinky) Date: Sun, 1 Jun 2008 19:33:58 +0200 Subject: [et-mgmt-tools] Booting Hangs on "Trying to Load: pxelinux.cfg/default" In-Reply-To: <4841B846.3090101@gmail.com> References: <4841B846.3090101@gmail.com> Message-ID: Make sure you have verbose enabled in /etc/xinetd.d/tftp .. server_args = -s -v -v -v /tftpboot ... You'll then see tftp hits in /var/log/messages. Example: /var/log/messages.3:May 13 09:12:47 islinky in.tftpd[3556]: RRQ from 137.138.32.49 filename tftpboot/dir/file.cbt /var/log/messages.3:May 13 09:12:47 islinky in.tftpd[3556]: sending NAK (1, File not found) to 137.138.32.49 It could just be some thing simple like you're dhcp points somewhere but your tftp "files" are else where. HTH Slinky 2008/5/31 Ole Ersoy : > Any trouble shooting tips? I used to get a "boot" menu prior to adding a > system... > > TIA, > - Ole > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > -- Regards Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: From ole.ersoy at gmail.com Sun Jun 1 19:40:09 2008 From: ole.ersoy at gmail.com (Ole Ersoy) Date: Sun, 01 Jun 2008 14:40:09 -0500 Subject: [et-mgmt-tools] cobbler check >> #0: please create directory: -v Message-ID: <4842FB19.7000102@gmail.com> Hi, I just ran cobbler check (On the latest download) and it told me the following: [root at localhost cobbler]# cobbler check The following potential problems were detected: #0: please create directory: -v #1: directory needs to be created: -v #2: One or more kickstart templates references default password 'cobbler' and should be changed for security reasons: /etc/cobbler/sample.ks, /etc/cobbler/legacy.ks, /etc/cobbler/sample_end.ks #0 and #1 seem a bit odd? Any thoughts? Thanks, - Ole From ole.ersoy at gmail.com Sun Jun 1 19:55:40 2008 From: ole.ersoy at gmail.com (Ole Ersoy) Date: Sun, 01 Jun 2008 14:55:40 -0500 Subject: [et-mgmt-tools] Booting Hangs on "Trying to Load: pxelinux.cfg/default" In-Reply-To: References: <4841B846.3090101@gmail.com> Message-ID: <4842FEBC.6060206@gmail.com> Slinky, Awesome - I get lots of information now, such as: Jun 1 14:11:53 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via eth0 Jun 1 14:11:53 localhost dhcpd: DHCPOFFER on 192.168.1.2 to 00:16:ec:cc:d1:f6 via eth0 Jun 1 14:11:55 localhost dhcpd: DHCPREQUEST for 192.168.1.2 (192.168.1.6) from 00:16:ec:cc:d1:f6 via eth0 Jun 1 14:11:55 localhost dhcpd: DHCPACK on 192.168.1.2 to 00:16:ec:cc:d1:f6 via eth0 Jun 1 14:11:55 localhost xinetd[30107]: START: tftp pid=30114 from=192.168.1.2 Jun 1 14:11:55 localhost in.tftpd[30115]: RRQ from 192.168.1.2 filename /pxelinux.0 Jun 1 14:11:55 localhost in.tftpd[30115]: tftp: client does not accept options Jun 1 14:11:55 localhost in.tftpd[30116]: RRQ from 192.168.1.2 filename /pxelinux.0 Jun 1 14:11:55 localhost in.tftpd[30117]: RRQ from 192.168.1.2 filename /pxelinux.cfg/01-00-16-ec-cc-d1-f6 Jun 1 14:11:55 localhost in.tftpd[30117]: sending NAK (1, File not found) to 192.168.1.2 Jun 1 14:11:55 localhost in.tftpd[30118]: RRQ from 192.168.1.2 filename /pxelinux.cfg/C0A80102 Jun 1 14:11:55 localhost in.tftpd[30118]: sending NAK (1, File not found) to 192.168.1.2 Jun 1 14:11:55 localhost in.tftpd[30119]: RRQ from 192.168.1.2 filename /pxelinux.cfg/C0A8010 Jun 1 14:11:55 localhost in.tftpd[30119]: sending NAK (1, File not found) to 192.168.1.2 Jun 1 14:11:55 localhost in.tftpd[30120]: RRQ from 192.168.1.2 filename /pxelinux.cfg/C0A801 Jun 1 14:11:55 localhost in.tftpd[30120]: sending NAK (1, File not found) to 192.168.1.2 Jun 1 14:11:55 localhost in.tftpd[30121]: RRQ from 192.168.1.2 filename /pxelinux.cfg/C0A80 Jun 1 14:11:55 localhost in.tftpd[30121]: sending NAK (1, File not found) to 192.168.1.2 Jun 1 14:11:55 localhost in.tftpd[30122]: RRQ from 192.168.1.2 filename /pxelinux.cfg/C0A8 Jun 1 14:11:55 localhost in.tftpd[30122]: sending NAK (1, File not found) to 192.168.1.2 Jun 1 14:11:55 localhost in.tftpd[30123]: RRQ from 192.168.1.2 filename /pxelinux.cfg/C0A Jun 1 14:11:55 localhost in.tftpd[30123]: sending NAK (1, File not found) to 192.168.1.2 Jun 1 14:11:55 localhost in.tftpd[30124]: RRQ from 192.168.1.2 filename /pxelinux.cfg/C0 Jun 1 14:11:55 localhost in.tftpd[30124]: sending NAK (1, File not found) to 192.168.1.2 Jun 1 14:11:55 localhost in.tftpd[30125]: RRQ from 192.168.1.2 filename /pxelinux.cfg/C Jun 1 14:11:55 localhost in.tftpd[30125]: sending NAK (1, File not found) to 192.168.1.2 Jun 1 14:11:55 localhost in.tftpd[30126]: RRQ from 192.168.1.2 filename /pxelinux.cfg/default Jun 1 14:11:55 localhost in.tftpd[30127]: RRQ from 192.168.1.2 filename /menu Jun 1 14:11:55 localhost in.tftpd[30127]: sending NAK (1, File not found) to 192.168.1.2 Jun 1 14:11:55 localhost in.tftpd[30128]: RRQ from 192.168.1.2 filename /menu.cbt Jun 1 14:11:55 localhost in.tftpd[30128]: sending NAK (1, File not found) to 192.168.1.2 Jun 1 14:11:55 localhost in.tftpd[30129]: RRQ from 192.168.1.2 filename /menu.0 Jun 1 14:11:55 localhost in.tftpd[30129]: sending NAK (1, File not found) to 192.168.1.2 Jun 1 14:11:55 localhost in.tftpd[30130]: RRQ from 192.168.1.2 filename /menu.com Jun 1 14:11:55 localhost in.tftpd[30130]: sending NAK (1, File not found) to 192.168.1.2 Jun 1 14:11:55 localhost in.tftpd[30131]: RRQ from 192.168.1.2 filename /menu.c32 Jun 1 14:11:55 localhost in.tftpd[30132]: RRQ from 192.168.1.2 filename /pxelinux.cfg/default So, I reread the man page, and it says that filename should be set to "pxelinux.0" and I had "/pxelinux.0", which is what dhcp.template came with (Should I file a ticket?). So I changed that to "pxelinux.0", and attempted to run cobbler sync, which tells me: [root at localhost ole]# cobbler sync cannot find directory: -v I tried restarting the cobbler daemon and doing cobbler sync and the same message appears. Thoughts? Thanks again, - Ole Slinky wrote: > Make sure you have verbose enabled in /etc/xinetd.d/tftp > > .. > server_args = -s -v -v -v /tftpboot > ... > > You'll then see tftp hits in /var/log/messages. Example: > > /var/log/messages.3:May 13 09:12:47 islinky in.tftpd[3556]: RRQ from > 137.138.32.49 filename tftpboot/dir/file.cbt > /var/log/messages.3:May 13 09:12:47 islinky in.tftpd[3556]: sending NAK > (1, File not found) to 137.138.32.49 > > It could just be some thing simple like you're dhcp points somewhere but > your tftp "files" are else where. > > HTH > Slinky > > > 2008/5/31 Ole Ersoy >: > > Any trouble shooting tips? I used to get a "boot" menu prior to > adding a system... > > TIA, > - Ole > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > > > > > -- > Regards > Dan > > > ------------------------------------------------------------------------ > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From swissslinky at gmail.com Sun Jun 1 20:15:47 2008 From: swissslinky at gmail.com (Slinky) Date: Sun, 1 Jun 2008 22:15:47 +0200 Subject: [et-mgmt-tools] Booting Hangs on "Trying to Load: pxelinux.cfg/default" In-Reply-To: <4842FEBC.6060206@gmail.com> References: <4841B846.3090101@gmail.com> <4842FEBC.6060206@gmail.com> Message-ID: 2008/6/1 Ole Ersoy : > Slinky, > > Awesome - I get lots of information now, such as: > > Jun 1 14:11:53 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via > eth0 > Jun 1 14:11:53 localhost dhcpd: DHCPOFFER on 192.168.1.2 to > 00:16:ec:cc:d1:f6 via eth0 > Jun 1 14:11:55 localhost dhcpd: DHCPREQUEST for 192.168.1.2 (192.168.1.6) > from 00:16:ec:cc:d1:f6 via eth0 > Jun 1 14:11:55 localhost dhcpd: DHCPACK on 192.168.1.2 to > 00:16:ec:cc:d1:f6 via eth0 > Jun 1 14:11:55 localhost xinetd[30107]: START: tftp pid=30114 from= > 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30115]: RRQ from 192.168.1.2 filename > /pxelinux.0 > Jun 1 14:11:55 localhost in.tftpd[30115]: tftp: client does not accept > options > Jun 1 14:11:55 localhost in.tftpd[30116]: RRQ from 192.168.1.2 filename > /pxelinux.0 > Jun 1 14:11:55 localhost in.tftpd[30117]: RRQ from 192.168.1.2 filename > /pxelinux.cfg/01-00-16-ec-cc-d1-f6 > Jun 1 14:11:55 localhost in.tftpd[30117]: sending NAK (1, File not found) > to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30118]: RRQ from 192.168.1.2 filename > /pxelinux.cfg/C0A80102 > Jun 1 14:11:55 localhost in.tftpd[30118]: sending NAK (1, File not found) > to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30119]: RRQ from 192.168.1.2 filename > /pxelinux.cfg/C0A8010 > Jun 1 14:11:55 localhost in.tftpd[30119]: sending NAK (1, File not found) > to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30120]: RRQ from 192.168.1.2 filename > /pxelinux.cfg/C0A801 > Jun 1 14:11:55 localhost in.tftpd[30120]: sending NAK (1, File not found) > to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30121]: RRQ from 192.168.1.2 filename > /pxelinux.cfg/C0A80 > Jun 1 14:11:55 localhost in.tftpd[30121]: sending NAK (1, File not found) > to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30122]: RRQ from 192.168.1.2 filename > /pxelinux.cfg/C0A8 > Jun 1 14:11:55 localhost in.tftpd[30122]: sending NAK (1, File not found) > to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30123]: RRQ from 192.168.1.2 filename > /pxelinux.cfg/C0A > Jun 1 14:11:55 localhost in.tftpd[30123]: sending NAK (1, File not found) > to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30124]: RRQ from 192.168.1.2 filename > /pxelinux.cfg/C0 > Jun 1 14:11:55 localhost in.tftpd[30124]: sending NAK (1, File not found) > to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30125]: RRQ from 192.168.1.2 filename > /pxelinux.cfg/C > Jun 1 14:11:55 localhost in.tftpd[30125]: sending NAK (1, File not found) > to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30126]: RRQ from 192.168.1.2 filename > /pxelinux.cfg/default > Jun 1 14:11:55 localhost in.tftpd[30127]: RRQ from 192.168.1.2 filename > /menu > Jun 1 14:11:55 localhost in.tftpd[30127]: sending NAK (1, File not found) > to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30128]: RRQ from 192.168.1.2 filename > /menu.cbt > Jun 1 14:11:55 localhost in.tftpd[30128]: sending NAK (1, File not found) > to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30129]: RRQ from 192.168.1.2 filename > /menu.0 > Jun 1 14:11:55 localhost in.tftpd[30129]: sending NAK (1, File not found) > to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30130]: RRQ from 192.168.1.2 filename / > menu.com > Jun 1 14:11:55 localhost in.tftpd[30130]: sending NAK (1, File not found) > to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30131]: RRQ from 192.168.1.2 filename > /menu.c32 > Jun 1 14:11:55 localhost in.tftpd[30132]: RRQ from 192.168.1.2 filename > /pxelinux.cfg/default > > So, I reread the man page, and it says that filename should be set to > "pxelinux.0" and I had "/pxelinux.0", which is what dhcp.template came with pxelinux.0 is the binary pxe loader. dhcp needs to point at pxelinux.0 (wherever it is*), as this is what the client needs to boot with. default is the default pxe configuration which a request falls down to if the corresponding 01-aa-bb-cc-dd-ee-ff isn't found, and is generally found in pxelinux.cfg/ * If my dhcp was something like... if option client-architecture = 00:00 { # Intel x86PC option LINUX.pxelinux-magic F1:00:74:7E; option LINUX.pxelinux-pathprefix "cobbler"; option LINUX.pxelinux-reboottime 50; filename "cobbler/loader/pxelinux.0"; } else if option client-architecture = 00:02 { # EFI Itanium filename "cobbler/loader/elilo64.0"; } else if option client-architecture = 00:06 { # EFI IA32 - future extension (think Intel Apple ..) filename "cobbler/loader/elilo32.0"; } A client would expect to find it in /tftpboot/cobbler/loader/pxelinux.0.... Does that help? > (Should I file a ticket?). No. > So I changed that to "pxelinux.0", and attempted to run cobbler sync, > which tells me: > > [root at localhost ole]# cobbler sync > cannot find directory: -v > > I tried restarting the cobbler daemon and doing cobbler sync and the same > message appears. Thoughts? > tbh your cobbler setup sounds a bit FUBAR. Purge and try again perhaps? > > Thanks again, > - Ole > > > > > Slinky wrote: > >> Make sure you have verbose enabled in /etc/xinetd.d/tftp >> >> .. >> server_args = -s -v -v -v /tftpboot >> ... >> >> You'll then see tftp hits in /var/log/messages. Example: >> >> /var/log/messages.3:May 13 09:12:47 islinky in.tftpd[3556]: RRQ from >> 137.138.32.49 filename tftpboot/dir/file.cbt >> /var/log/messages.3:May 13 09:12:47 islinky in.tftpd[3556]: sending NAK >> (1, File not found) to 137.138.32.49 >> >> It could just be some thing simple like you're dhcp points somewhere but >> your tftp "files" are else where. >> >> HTH >> Slinky >> >> >> 2008/5/31 Ole Ersoy >: >> >> Any trouble shooting tips? I used to get a "boot" menu prior to >> adding a system... >> >> TIA, >> - Ole >> >> _______________________________________________ >> et-mgmt-tools mailing list >> et-mgmt-tools at redhat.com >> https://www.redhat.com/mailman/listinfo/et-mgmt-tools >> >> >> >> >> -- >> Regards >> Dan >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> et-mgmt-tools mailing list >> et-mgmt-tools at redhat.com >> https://www.redhat.com/mailman/listinfo/et-mgmt-tools >> > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > -- Regards Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: From ole.ersoy at gmail.com Sun Jun 1 22:02:31 2008 From: ole.ersoy at gmail.com (Ole Ersoy) Date: Sun, 01 Jun 2008 17:02:31 -0500 Subject: [et-mgmt-tools] Booting Hangs on "Trying to Load: pxelinux.cfg/default" In-Reply-To: References: <4841B846.3090101@gmail.com> <4842FEBC.6060206@gmail.com> Message-ID: <48431C77.1000508@gmail.com> > pxelinux.0 is the binary pxe loader. dhcp needs to point at pxelinux.0 > (wherever it is*), as this is what the client needs to boot with. > > default is the default pxe configuration which a request falls down to > if the corresponding 01-aa-bb-cc-dd-ee-ff isn't found, and is generally > found in pxelinux.cfg/ > > A client would expect to find it in /tftpboot/cobbler/loader/pxelinux.0.... > > Does that help? I think so. Just want to make sure I'm clear. The file is currently here: [root at localhost ole]# ls /tftpboot/ elilo-3.6-ia64.efi images menu.c32 pxelinux.0 pxelinux.cfg So if I put "pxelinux.0" for the filename option it should resolve correctly right? > > > So I changed that to "pxelinux.0", and attempted to run cobbler > sync, which tells me: > > [root at localhost ole]# cobbler sync > cannot find directory: -v > > I tried restarting the cobbler daemon and doing cobbler sync and the > same message appears. Thoughts? > > > tbh your cobbler setup sounds a bit FUBAR. Purge and try again perhaps? I'll try to nuke the system and profile I added to see whether that caused the hiccup. It was syncing fine before that. Otherwise I'll start from scratch. Thanks! - Ole From swissslinky at gmail.com Mon Jun 2 08:41:23 2008 From: swissslinky at gmail.com (Slinky) Date: Mon, 2 Jun 2008 10:41:23 +0200 Subject: [et-mgmt-tools] Booting Hangs on "Trying to Load: pxelinux.cfg/default" In-Reply-To: <48431C77.1000508@gmail.com> References: <4841B846.3090101@gmail.com> <4842FEBC.6060206@gmail.com> <48431C77.1000508@gmail.com> Message-ID: 2008/6/2 Ole Ersoy : > pxelinux.0 is the binary pxe loader. dhcp needs to point at pxelinux.0 >> (wherever it is*), as this is what the client needs to boot with. >> >> default is the default pxe configuration which a request falls down to if >> the corresponding 01-aa-bb-cc-dd-ee-ff isn't found, and is generally found >> in pxelinux.cfg/ >> >> A client would expect to find it in >> /tftpboot/cobbler/loader/pxelinux.0.... >> >> Does that help? >> > > I think so. Just want to make sure I'm clear. The file is currently here: > > [root at localhost ole]# ls /tftpboot/ > elilo-3.6-ia64.efi images menu.c32 pxelinux.0 pxelinux.cfg > > So if I put "pxelinux.0" for the filename option it should resolve > correctly right? > That's right. If your loader is at /tftpboot/loader/pxelinux.0 then dhcp would point at /loader/pxelinux.0 > > > >> So I changed that to "pxelinux.0", and attempted to run cobbler >> sync, which tells me: >> >> [root at localhost ole]# cobbler sync >> cannot find directory: -v >> >> I tried restarting the cobbler daemon and doing cobbler sync and the >> same message appears. Thoughts? >> >> >> tbh your cobbler setup sounds a bit FUBAR. Purge and try again perhaps? >> > > I'll try to nuke the system and profile I added to see whether that caused > the hiccup. It was syncing fine before that. Otherwise I'll start from > scratch. > > Thanks! > - Ole > > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > -- Regards Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: From rjones at redhat.com Mon Jun 2 09:52:19 2008 From: rjones at redhat.com (Richard W.M. Jones) Date: Mon, 2 Jun 2008 10:52:19 +0100 Subject: [et-mgmt-tools] Re: ocaml-libvirt-0.4.0.1: Can't connect to Xen- Host In-Reply-To: References: <20080527094516.GC29698@amd.home.annexia.org> Message-ID: <20080602095219.GD29726@amd.home.annexia.org> On Wed, May 28, 2008 at 12:22:53PM +0200, Feichtinger G?nter wrote: > > -----Urspr?ngliche Nachricht----- > > Von: Richard W.M. Jones [mailto:rjones at redhat.com] > > Gesendet: Dienstag, 27. Mai 2008 11:45 > > An: Feichtinger G?nter > > Cc: et-mgmt-tools at redhat.com > > Betreff: Re: ocaml-libvirt-0.4.0.1: Can't connect to Xen- Host > > > > On Tue, May 27, 2008 at 11:37:10AM +0200, Feichtinger G?nter wrote: > > > I intstalled the ocaml-libvirt-0.4.0.1.exe on MS- Vista > > without problems. > > > Also the virt-ctrl.exe starts without problems. > > > But when I try to connect to a Xen-Host I get the messages: > > > libvir: Remote error : Cannot access CA certificate > > > 'C:/msys/1.0/local/etc/pki/C > > > A/cacert.pem': No such file or directory (2) > > > > > > Please be so kind and help. > > > > It's not very clear to me what you are trying to connect to > > what, but you'll probably want to read about remote connections, here: > > > > http://libvirt.org/remote.html > > > > Rich. > > Hello Richard, > thanks for your prompt answer. I see, I have to explain it more excatly. > I have 3 Xen-Hosts (CentOS 5.1) and use virt-managaer local an this hosts. > I'm looking for a possibility to manages xen-hosts from MS-Windows-Clients like VMWareServerConsole. > So I was looking around and found your port of the virt-manager. > I tried to connect with xen://xen-host/ and get the message above. > Which possibility to I have for remote connections? I think I read that with your virt-manager port only support TLS, isn't it? > So do I have to work with certificates? In my test-envirment a "low" security solution is also fine :-) The first thing to say is that this isn't a port of virt-manager. We couldn't get that working on Windows because the Python stuff for Win32 was too complicated. This is a port of virt-ctrl instead (http://et.redhat.com/~rjones/virt-ctrl/) which is a far less powerful virt-manager clone that I wrote in my spare time, just as an experiment. (It's also a rather old version of virt-ctrl. I really must update that package ...) Anyway, you should be able to set up your Xen hosts so that TCP (insecure) connections are possible. Assuming that libvirtd is running, there should be a file /etc/libvirt/libvirtd.conf which you can edit to enable TCP connections: http://libvirt.org/remote.html#Remote_libvirtd_configuration listen_tcp = 1 I believe you also need to edit /etc/sysconfig/libvirtd and uncomment: LIBVIRTD_ARGS="--listen" and of course open firewall port 16509 if necessary. Then you should be able to connect remotely using this URI: xen+tcp://hostname/ TCP connections are totally insecure, so you should only do this on a private network. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my OCaml programming blog: http://camltastic.blogspot.com/ Fedora now supports 59 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora From berrange at redhat.com Mon Jun 2 09:59:54 2008 From: berrange at redhat.com (Daniel P. Berrange) Date: Mon, 2 Jun 2008 10:59:54 +0100 Subject: [et-mgmt-tools] Re: ocaml-libvirt-0.4.0.1: Can't connect to Xen- Host In-Reply-To: <20080602095219.GD29726@amd.home.annexia.org> References: <20080527094516.GC29698@amd.home.annexia.org> <20080602095219.GD29726@amd.home.annexia.org> Message-ID: <20080602095954.GA5069@redhat.com> On Mon, Jun 02, 2008 at 10:52:19AM +0100, Richard W.M. Jones wrote: > http://libvirt.org/remote.html#Remote_libvirtd_configuration > > listen_tcp = 1 > > I believe you also need to edit /etc/sysconfig/libvirtd and uncomment: > > LIBVIRTD_ARGS="--listen" > > and of course open firewall port 16509 if necessary. > > Then you should be able to connect remotely using this URI: > > xen+tcp://hostname/ > > TCP connections are totally insecure, so you should only do this on a > private network. This is no longer true. Recent libvirt will enable SASL authentication on the TCP socket by default, and the default SASL config for libvirt turns on digest-md5 which provides by username+password authentication and subsquent session encryption. You can also switch SASL to use kerberos which again provides auth & session encryption. With either digest-md5 or Kerberos, the security is on a par with SSL/TLS in terms of encryption strength http://libvirt.org/auth.html#ACL_server_username Regards, Daniel. -- |: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From mdehaan at redhat.com Mon Jun 2 14:01:19 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Mon, 02 Jun 2008 10:01:19 -0400 Subject: [et-mgmt-tools] cobbler check >> #0: please create directory: -v In-Reply-To: <4842FB19.7000102@gmail.com> References: <4842FB19.7000102@gmail.com> Message-ID: <4843FD2F.6060204@redhat.com> Ole Ersoy wrote: > Hi, > > I just ran cobbler check (On the latest download) and it told me the > following: > > [root at localhost cobbler]# cobbler check > The following potential problems were detected: > #0: please create directory: -v > #1: directory needs to be created: -v > #2: One or more kickstart templates references default password > 'cobbler' and should be changed for security reasons: > /etc/cobbler/sample.ks, /etc/cobbler/legacy.ks, > /etc/cobbler/sample_end.ks > > #0 and #1 seem a bit odd? Any thoughts? > > Thanks, > - Ole > > Please post the full contents of your /etc/tftp.d/init.d file as well as what OS you are using (rpm -q --what-provides redhat-release). Since the default location in F9 (/var/lib/tftpboot) is different than those in previous versions (/tftpboot), Cobbler needs to parse this file to find out what location you are using. It expects to see something like: server_args = -s /tftpboot Something in your file is confusing the parser. > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From mdehaan at redhat.com Mon Jun 2 14:02:31 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Mon, 02 Jun 2008 10:02:31 -0400 Subject: [et-mgmt-tools] Booting Hangs on "Trying to Load: pxelinux.cfg/default" In-Reply-To: References: <4841B846.3090101@gmail.com> Message-ID: <4843FD77.1010305@redhat.com> Slinky wrote: > Make sure you have verbose enabled in /etc/xinetd.d/tftp > > .. > server_args = -s -v -v -v /tftpboot > ... Regarding your other post about server locations, here's your problem, Mr. Slinky broke you :) -s /tftpboot -vvv You just set directory explicitly to "-v" :) > > You'll then see tftp hits in /var/log/messages. Example: > > /var/log/messages.3:May 13 09:12:47 islinky in.tftpd[3556]: RRQ from > 137.138.32.49 filename tftpboot/dir/file.cbt > /var/log/messages.3:May 13 09:12:47 islinky in.tftpd[3556]: sending > NAK (1, File not found) to 137.138.32.49 > > It could just be some thing simple like you're dhcp points somewhere > but your tftp "files" are else where. > > HTH > Slinky > > > 2008/5/31 Ole Ersoy >: > > Any trouble shooting tips? I used to get a "boot" menu prior to > adding a system... > > TIA, > - Ole > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > > > > > -- > Regards > Dan > ------------------------------------------------------------------------ > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From mdehaan at redhat.com Mon Jun 2 14:05:28 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Mon, 02 Jun 2008 10:05:28 -0400 Subject: [et-mgmt-tools] Re: dhcpctl_connect: connection refused In-Reply-To: <4841AE1A.8070000@gmail.com> References: <3cc2cbc40805301436g3fe78536tcd29f93bb207f2f4@mail.gmail.com> <80d7e4090805301439u658ae9a4xa2ee1e18170ab897@mail.gmail.com> <3cc2cbc40805301444m6cb134d8m57f4153efb5e3a2@mail.gmail.com> <80d7e4090805301522p432b320as8b9348f885303584@mail.gmail.com> <4840827E.7010000@gmail.com> <4841AE1A.8070000@gmail.com> Message-ID: <4843FE28.9030900@redhat.com> Ole Ersoy wrote: > I think I got it and created a ticket for it in case someone else runs > into the same thing: > > https://fedorahosted.org/cobbler/ticket/160 > > Cheers, > - Ole > > This is most likely /not/ a bug, rather your dhcp template doesn't have OMAPI enabled, since it probably came from a previous upgrade. Look in /etc/cobbler for a dhcp.template versus a dhcp.template.rpmnew. Now examine the differences and add the omapi parts to the template. Alternatively, set omapi_enabled to 0 in /etc/cobbler/settings. > > Ole Ersoy wrote: >> Hi, >> >> I added a profile and now when I attempt to sync I get: >> >> [root at localhost cobbler]# cobbler sync >> dhcpctl_connect: connection refused >> dhcpctl_connect: connection refused >> >> Any ideas? >> >> Running cobbler check shows this: >> >> [root at localhost cobbler]# cobbler check >> The following potential problems were detected: >> #0: One or more kickstart templates references default password >> 'cobbler' and should be changed for security reasons: >> /etc/cobbler/sample.ks, /etc/cobbler/legacy.ks, >> /etc/cobbler/sample_end.ks >> >> TIA, >> - Ole >> >> >> > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From swissslinky at gmail.com Mon Jun 2 14:10:12 2008 From: swissslinky at gmail.com (Slinky) Date: Mon, 2 Jun 2008 16:10:12 +0200 Subject: [et-mgmt-tools] Booting Hangs on "Trying to Load: pxelinux.cfg/default" In-Reply-To: <4843FD77.1010305@redhat.com> References: <4841B846.3090101@gmail.com> <4843FD77.1010305@redhat.com> Message-ID: 2008/6/2 Michael DeHaan : > Slinky wrote: > >> Make sure you have verbose enabled in /etc/xinetd.d/tftp >> >> .. >> server_args = -s -v -v -v /tftpboot >> ... >> > > Regarding your other post about server locations, here's your problem, Mr. > Slinky broke you :) > > -s /tftpboot -vvv > > You just set directory explicitly to "-v" :) lies! LIES!!* * based on the fact it works for us :) > > > > >> You'll then see tftp hits in /var/log/messages. Example: >> >> /var/log/messages.3:May 13 09:12:47 islinky in.tftpd[3556]: RRQ from >> 137.138.32.49 filename tftpboot/dir/file.cbt >> /var/log/messages.3:May 13 09:12:47 islinky in.tftpd[3556]: sending NAK >> (1, File not found) to 137.138.32.49 >> >> It could just be some thing simple like you're dhcp points somewhere but >> your tftp "files" are else where. >> >> HTH >> Slinky >> >> >> 2008/5/31 Ole Ersoy >: >> >> Any trouble shooting tips? I used to get a "boot" menu prior to >> adding a system... >> >> TIA, >> - Ole >> >> _______________________________________________ >> et-mgmt-tools mailing list >> et-mgmt-tools at redhat.com >> https://www.redhat.com/mailman/listinfo/et-mgmt-tools >> >> >> >> >> -- >> Regards >> Dan >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> et-mgmt-tools mailing list >> et-mgmt-tools at redhat.com >> https://www.redhat.com/mailman/listinfo/et-mgmt-tools >> > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > -- Regards Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdehaan at redhat.com Mon Jun 2 14:14:18 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Mon, 02 Jun 2008 10:14:18 -0400 Subject: [et-mgmt-tools] Booting Hangs on "Trying to Load: pxelinux.cfg/default" In-Reply-To: <4842FEBC.6060206@gmail.com> References: <4841B846.3090101@gmail.com> <4842FEBC.6060206@gmail.com> Message-ID: <4844003A.5020300@redhat.com> Ole Ersoy wrote: > Slinky, > > Awesome - I get lots of information now, such as: > > Jun 1 14:11:53 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 > via eth0 > Jun 1 14:11:53 localhost dhcpd: DHCPOFFER on 192.168.1.2 to > 00:16:ec:cc:d1:f6 via eth0 > Jun 1 14:11:55 localhost dhcpd: DHCPREQUEST for 192.168.1.2 > (192.168.1.6) from 00:16:ec:cc:d1:f6 via eth0 > Jun 1 14:11:55 localhost dhcpd: DHCPACK on 192.168.1.2 to > 00:16:ec:cc:d1:f6 via eth0 > Jun 1 14:11:55 localhost xinetd[30107]: START: tftp pid=30114 > from=192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30115]: RRQ from 192.168.1.2 > filename /pxelinux.0 > Jun 1 14:11:55 localhost in.tftpd[30115]: tftp: client does not > accept options > Jun 1 14:11:55 localhost in.tftpd[30116]: RRQ from 192.168.1.2 > filename /pxelinux.0 > Jun 1 14:11:55 localhost in.tftpd[30117]: RRQ from 192.168.1.2 > filename /pxelinux.cfg/01-00-16-ec-cc-d1-f6 > Jun 1 14:11:55 localhost in.tftpd[30117]: sending NAK (1, File not > found) to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30118]: RRQ from 192.168.1.2 > filename /pxelinux.cfg/C0A80102 > Jun 1 14:11:55 localhost in.tftpd[30118]: sending NAK (1, File not > found) to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30119]: RRQ from 192.168.1.2 > filename /pxelinux.cfg/C0A8010 > Jun 1 14:11:55 localhost in.tftpd[30119]: sending NAK (1, File not > found) to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30120]: RRQ from 192.168.1.2 > filename /pxelinux.cfg/C0A801 > Jun 1 14:11:55 localhost in.tftpd[30120]: sending NAK (1, File not > found) to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30121]: RRQ from 192.168.1.2 > filename /pxelinux.cfg/C0A80 > Jun 1 14:11:55 localhost in.tftpd[30121]: sending NAK (1, File not > found) to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30122]: RRQ from 192.168.1.2 > filename /pxelinux.cfg/C0A8 > Jun 1 14:11:55 localhost in.tftpd[30122]: sending NAK (1, File not > found) to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30123]: RRQ from 192.168.1.2 > filename /pxelinux.cfg/C0A > Jun 1 14:11:55 localhost in.tftpd[30123]: sending NAK (1, File not > found) to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30124]: RRQ from 192.168.1.2 > filename /pxelinux.cfg/C0 > Jun 1 14:11:55 localhost in.tftpd[30124]: sending NAK (1, File not > found) to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30125]: RRQ from 192.168.1.2 > filename /pxelinux.cfg/C > Jun 1 14:11:55 localhost in.tftpd[30125]: sending NAK (1, File not > found) to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30126]: RRQ from 192.168.1.2 > filename /pxelinux.cfg/default > Jun 1 14:11:55 localhost in.tftpd[30127]: RRQ from 192.168.1.2 > filename /menu > Jun 1 14:11:55 localhost in.tftpd[30127]: sending NAK (1, File not > found) to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30128]: RRQ from 192.168.1.2 > filename /menu.cbt > Jun 1 14:11:55 localhost in.tftpd[30128]: sending NAK (1, File not > found) to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30129]: RRQ from 192.168.1.2 > filename /menu.0 > Jun 1 14:11:55 localhost in.tftpd[30129]: sending NAK (1, File not > found) to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30130]: RRQ from 192.168.1.2 > filename /menu.com > Jun 1 14:11:55 localhost in.tftpd[30130]: sending NAK (1, File not > found) to 192.168.1.2 > Jun 1 14:11:55 localhost in.tftpd[30131]: RRQ from 192.168.1.2 > filename /menu.c32 > Jun 1 14:11:55 localhost in.tftpd[30132]: RRQ from 192.168.1.2 > filename /pxelinux.cfg/default > > So, I reread the man page, and it says that filename should be set to > "pxelinux.0" and I had "/pxelinux.0", which is what dhcp.template came > with (Should I file a ticket?). So I changed that to "pxelinux.0", > and attempted to run cobbler sync, which tells me: No you shouldn't :) I closed it. TFTP paths are chroot. See what I posed earlier about your server_args being wrong. From mdehaan at redhat.com Mon Jun 2 14:16:29 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Mon, 02 Jun 2008 10:16:29 -0400 Subject: [et-mgmt-tools] Booting Hangs on "Trying to Load: pxelinux.cfg/default" In-Reply-To: References: <4841B846.3090101@gmail.com> <4843FD77.1010305@redhat.com> Message-ID: <484400BD.1020101@redhat.com> > > lies! LIES!!* > > > * based on the fact it works for us :) That may be, but if so, it's likely tftpd noting the directory arguments are junk and defaulting to /tftpboot :) -s Change root directory on startup. This means the remote host does not need to pass along the directory as part of the trans- fer, and may add security. When -s is specified, exactly one directory should be specified on the command line. The use of this option is recommended for security as well as compatibility with some boot ROMs which cannot be easily made to include a directory name in its request. From crobinso at redhat.com Mon Jun 2 14:30:12 2008 From: crobinso at redhat.com (Cole Robinson) Date: Mon, 02 Jun 2008 10:30:12 -0400 Subject: [et-mgmt-tools] Virt-Install options In-Reply-To: <1E61D08F64B6BB4AB0EC91C72FBDB81613AB3740@exchange.ag.state.la.us> References: <1E61D08F64B6BB4AB0EC91C72FBDB81613AB3740@exchange.ag.state.la.us> Message-ID: <484403F4.1030505@redhat.com> Seale, Mark wrote: > Would anyone happen to know if there is a method to specify different > NIC models on startup or install of a guest OS? I know Qemu and KVM are > capable of it with the '-net nic,model=', but I wasn't sure if there is > a way to do this when using virt-install. Every OpenBSD VM I make is > giving watchdog timeout errors for the NIC (re0)... > No there currently is no cmdline switch to specify a nic model. Support for specifying a nic model was recently added to libvirt, so it certainly is something we could support for virt-install. - Cole From berrange at redhat.com Mon Jun 2 14:34:57 2008 From: berrange at redhat.com (Daniel P. Berrange) Date: Mon, 2 Jun 2008 15:34:57 +0100 Subject: [et-mgmt-tools] Virt-Install options In-Reply-To: <484403F4.1030505@redhat.com> References: <1E61D08F64B6BB4AB0EC91C72FBDB81613AB3740@exchange.ag.state.la.us> <484403F4.1030505@redhat.com> Message-ID: <20080602143457.GF5069@redhat.com> On Mon, Jun 02, 2008 at 10:30:12AM -0400, Cole Robinson wrote: > Seale, Mark wrote: > > Would anyone happen to know if there is a method to specify different > > NIC models on startup or install of a guest OS? I know Qemu and KVM are > > capable of it with the '-net nic,model=', but I wasn't sure if there is > > a way to do this when using virt-install. Every OpenBSD VM I make is > > giving watchdog timeout errors for the NIC (re0)... > > > > No there currently is no cmdline switch to specify a nic model. Support > for specifying a nic model was recently added to libvirt, so it certainly > is something we could support for virt-install. We should automatically set the optimal NIC according to the OS type and variant provided - we don't need to expose this as an explicit command line arg. Just need someone to say what the optimal NIC for OpenBSD is ? Choice of ne2k, rtl8139, e1000 ... take your pick Regards, Daniel -- |: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From swissslinky at gmail.com Mon Jun 2 14:23:25 2008 From: swissslinky at gmail.com (Slinky) Date: Mon, 2 Jun 2008 16:23:25 +0200 Subject: [et-mgmt-tools] Booting Hangs on "Trying to Load: pxelinux.cfg/default" In-Reply-To: <484400BD.1020101@redhat.com> References: <4841B846.3090101@gmail.com> <4843FD77.1010305@redhat.com> <484400BD.1020101@redhat.com> Message-ID: ...I should make clear that this box is non Cobbler, so we're both kinda right I guess without the v's, we get nothing in the logs so the options are being parsed... 2008/6/2 Michael DeHaan : > > >> lies! LIES!!* >> >> >> * based on the fact it works for us :) >> > > That may be, but if so, it's likely tftpd noting the directory arguments > are junk and defaulting to /tftpboot :) > > -s Change root directory on startup. This means the remote host > does not need to pass along the directory as part of the > trans- > fer, and may add security. When -s is specified, exactly > one > directory should be specified on the command line. The use > of > this option is recommended for security as well as > compatibility > with some boot ROMs which cannot be easily made to include > a > directory name in its request. > > > > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ole.ersoy at gmail.com Mon Jun 2 14:51:28 2008 From: ole.ersoy at gmail.com (Ole Ersoy) Date: Mon, 02 Jun 2008 09:51:28 -0500 Subject: [et-mgmt-tools] Booting Hangs on "Trying to Load: pxelinux.cfg/default" In-Reply-To: <4843FD77.1010305@redhat.com> References: <4841B846.3090101@gmail.com> <4843FD77.1010305@redhat.com> Message-ID: <484408F0.4030603@gmail.com> Michael DeHaan wrote: > Slinky wrote: >> Make sure you have verbose enabled in /etc/xinetd.d/tftp >> >> .. >> server_args = -s -v -v -v /tftpboot >> ... > > Regarding your other post about server locations, here's your problem, > Mr. Slinky broke you :) > > -s /tftpboot -vvv > > You just set directory explicitly to "-v" :) Doh! OK - I should have realized that given that I started getting the -v message right after :-). I changed it back, and now cobbler is syncing fine. Thanks, - Ole > > >> >> You'll then see tftp hits in /var/log/messages. Example: >> >> /var/log/messages.3:May 13 09:12:47 islinky in.tftpd[3556]: RRQ from >> 137.138.32.49 filename tftpboot/dir/file.cbt >> /var/log/messages.3:May 13 09:12:47 islinky in.tftpd[3556]: sending >> NAK (1, File not found) to 137.138.32.49 >> >> It could just be some thing simple like you're dhcp points somewhere >> but your tftp "files" are else where. >> >> HTH >> Slinky >> >> >> 2008/5/31 Ole Ersoy >: >> >> Any trouble shooting tips? I used to get a "boot" menu prior to >> adding a system... >> >> TIA, >> - Ole >> >> _______________________________________________ >> et-mgmt-tools mailing list >> et-mgmt-tools at redhat.com >> https://www.redhat.com/mailman/listinfo/et-mgmt-tools >> >> >> >> >> -- >> Regards >> Dan >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> et-mgmt-tools mailing list >> et-mgmt-tools at redhat.com >> https://www.redhat.com/mailman/listinfo/et-mgmt-tools > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > From SealeM at ag.state.la.us Mon Jun 2 14:44:29 2008 From: SealeM at ag.state.la.us (Seale, Mark) Date: Mon, 2 Jun 2008 09:44:29 -0500 Subject: [et-mgmt-tools] Virt-Install options In-Reply-To: <20080602143457.GF5069@redhat.com> References: <1E61D08F64B6BB4AB0EC91C72FBDB81613AB3740@exchange.ag.state.la.us><484403F4.1030505@redhat.com> <20080602143457.GF5069@redhat.com> Message-ID: <1E61D08F64B6BB4AB0EC91C72FBDB81613AB3D60@exchange.ag.state.la.us> E1000 or pcnet would work from what I've been able to tell setting it up with qemu. Thank you for the help! Mark -----Original Message----- From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Daniel P. Berrange Sent: Monday, June 02, 2008 9:35 AM To: Fedora/Linux Management Tools Cc: Seale, Mark Subject: Re: [et-mgmt-tools] Virt-Install options On Mon, Jun 02, 2008 at 10:30:12AM -0400, Cole Robinson wrote: > Seale, Mark wrote: > > Would anyone happen to know if there is a method to specify different > > NIC models on startup or install of a guest OS? I know Qemu and KVM are > > capable of it with the '-net nic,model=', but I wasn't sure if there is > > a way to do this when using virt-install. Every OpenBSD VM I make is > > giving watchdog timeout errors for the NIC (re0)... > > > > No there currently is no cmdline switch to specify a nic model. Support > for specifying a nic model was recently added to libvirt, so it certainly > is something we could support for virt-install. We should automatically set the optimal NIC according to the OS type and variant provided - we don't need to expose this as an explicit command line arg. Just need someone to say what the optimal NIC for OpenBSD is ? Choice of ne2k, rtl8139, e1000 ... take your pick Regards, Daniel -- |: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools at redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools The information contained in this transmission may contain privileged and confidential information. It is intended only for the use of the person(s) named above. If you are not the intended recipient, you are hereby notified that any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. To reply to our e-mail administrator directly, please send an e-mail to postmaster at ag.state.la.us From dmourati at gmail.com Mon Jun 2 17:58:22 2008 From: dmourati at gmail.com (Demetri Mouratis) Date: Mon, 2 Jun 2008 10:58:22 -0700 Subject: [et-mgmt-tools] CentOS 4 Cobbler Server Hosting CentOS 5 Repository In-Reply-To: <80d7e4090805301611u66a1f342qb9ab0e34ad94e086@mail.gmail.com> References: <3cc2cbc40805301436g3fe78536tcd29f93bb207f2f4@mail.gmail.com> <80d7e4090805301439u658ae9a4xa2ee1e18170ab897@mail.gmail.com> <3cc2cbc40805301444m6cb134d8m57f4153efb5e3a2@mail.gmail.com> <80d7e4090805301522p432b320as8b9348f885303584@mail.gmail.com> <3cc2cbc40805301603j2d841861vcb965b0c235fe295@mail.gmail.com> <80d7e4090805301611u66a1f342qb9ab0e34ad94e086@mail.gmail.com> Message-ID: <3cc2cbc40806021058y1133b06an5324b305235634d5@mail.gmail.com> On Fri, May 30, 2008 at 4:11 PM, Stephen John Smoogen wrote: > Ok this sounds more like the kickstart you are using is not pointing > to the correct repo. > If you loaded centos in via a profile.. you should be able to look at it like: > > cobbler profile report --name=centos-5.1-server-i386 > > or some such thing.. the default kickstart is then: > > # cobbler profile report --name=rhel-5.1-server-i386 This looks okay to me: [root at lncbuild repodata]# cobbler profile report --name centos5servers profile : centos5servers distro : centos5-i386 kickstart : /var/www/html/kickstart/cfgs/ks-centos-5.cfg kernel options : {} ks metadata : {} virt file size : 5 virt ram : 512 virt type : auto virt path : virt bridge : xenbr0 virt cpus : 1 repos : [] dhcp tag : default server : <> [root at lncbuild repodata]# cat /var/www/html/kickstart/cfgs/ks-centos-5.cfg # Kickstart file generated by Demetri install url --url http://lncbuild.lnc.rnmd.net/cobbler/repo_mirror/centos5-i386/ . . . And the distro: [root at lncbuild repodata]# cobbler distro report --name centos5-i386 distro : centos5-i386 kernel : /var/www/cobbler/repo_mirror/centos5-i386/images/pxeboot/vmlinuz initrd : /var/www/cobbler/repo_mirror/centos5-i386/images/pxeboot/initrd.img kernel options : {} architecture : x86 ks metadata : {} breed : redhat The last few lines of the httpd show anaconda pulling files just generated by createrepo (post-rsync). [root at lncbuild repodata]# tail -f /var/log/httpd/access_log 91.102.40.136 - - [02/Jun/2008:17:48:59 +0000] "GET /cblr/kickstarts_sys/test1/ks.cfg HTTP/1.0" 200 1706 "-" "anaconda/11.1.2.87" 91.102.40.136 - - [02/Jun/2008:17:49:05 +0000] "GET /cobbler/repo_mirror/centos5-i386//images/updates.img HTTP/1.0" 404 337 "-" "anaconda/11.1.2.87" 91.102.40.136 - - [02/Jun/2008:17:49:05 +0000] "GET /cobbler/repo_mirror/centos5-i386//disc1/images/updates.img HTTP/1.0" 404 343 "-" "anaconda/11.1.2.87" 91.102.40.136 - - [02/Jun/2008:17:49:05 +0000] "GET /cobbler/repo_mirror/centos5-i386//images/product.img HTTP/1.0" 404 337 "-" "anaconda/11.1.2.87" 91.102.40.136 - - [02/Jun/2008:17:49:05 +0000] "GET /cobbler/repo_mirror/centos5-i386//disc1/images/product.img HTTP/1.0" 404 343 "-" "anaconda/11.1.2.87" 91.102.40.136 - - [02/Jun/2008:17:49:05 +0000] "GET /cobbler/repo_mirror/centos5-i386//images/minstg2.img HTTP/1.0" 200 36532224 "-" "anaconda/11.1.2.87" 91.102.40.136 - - [02/Jun/2008:17:49:16 +0000] "GET /cobbler/repo_mirror/centos5-i386///disc1/.discinfo HTTP/1.1" 404 335 "-" "urlgrabber/3.1.0" 91.102.40.136 - - [02/Jun/2008:17:49:17 +0000] "GET /cobbler/repo_mirror/centos5-i386/repodata/repomd.xml HTTP/1.1" 200 951 "-" "urlgrabber/3.1.0" 91.102.40.136 - - [02/Jun/2008:17:49:17 +0000] "GET /cobbler/repo_mirror/centos5-i386/repodata/primary.xml.gz HTTP/1.1" 200 841147 "-" "urlgrabber/3.1.0" From James_Martin at ao.uscourts.gov Mon Jun 2 18:53:55 2008 From: James_Martin at ao.uscourts.gov (James_Martin at ao.uscourts.gov) Date: Mon, 2 Jun 2008 14:53:55 -0400 Subject: [et-mgmt-tools] Cobbler: defining network profiles Message-ID: Greetings folks. I was working out a RFE with mpdehaan in #cobbler this morning, and he thought I should post it here to get other folks input. https://fedorahosted.org/cobbler/ticket/164 I think it would be a great addition to be able to define network profiles for systems/profiles, etc. A network profile would consist of : subnet mask default gateway dns server I picture it working like this: On the CLI: First you would define your network profile with the appropriate addresses. cobbler add network foonet --netmask=255.255.255.0 --gateway=192.168.1.1 --dns1=192.168.1.10 --domain=mylab.mycompany.com Secondly, when adding a new system, there is the new option of "--network". So for system foo, which belonged to the foonet, you would do: cobbler system add foo --network=foonet ip=192.168.101 --hostname=foo This would become very handy especially if you have to re-ip your network, and its also a nice short cut. In the background, my guess is that the information is still stored the same way, and if a network profile is changed, systems that use it are synced whenever a cobbler sync occurs. In the webui, there would be an option for adding network profiles, and a drop down for select the network profiles when adding a system. James?S.?Martin,?RHCE Contractor Administrative?Office?of?the?United?States?Courts Washington,?DC (202)?502-2394 From ole.ersoy at gmail.com Mon Jun 2 18:58:55 2008 From: ole.ersoy at gmail.com (Ole Ersoy) Date: Mon, 02 Jun 2008 13:58:55 -0500 Subject: [et-mgmt-tools] DHCP Troubleshooting Message-ID: <484442EF.1070202@gmail.com> Hi, I've been attempting an install for a while now and playing around with a lot of settings. At this point my client just says "No DHCP Lease Offer Received". However /var/log/messages looks like this: Jun 2 12:55:05 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via eth0 Jun 2 12:55:05 localhost dhcpd: DHCPOFFER on 192.168.1.2 to 00:16:ec:cc:d1:f6 via eth0 Jun 2 12:55:28 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via eth0 Jun 2 12:55:28 localhost dhcpd: DHCPOFFER on 192.168.1.2 to 00:16:ec:cc:d1:f6 via eth0 Jun 2 12:55:30 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via eth0 Jun 2 12:55:30 localhost dhcpd: DHCPOFFER on 192.168.1.2 to 00:16:ec:cc:d1:f6 via eth0 Jun 2 12:55:34 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via eth0 Jun 2 12:55:34 localhost dhcpd: DHCPOFFER on 192.168.1.2 to 00:16:ec:cc:d1:f6 via eth0 Jun 2 12:55:42 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via eth0 Jun 2 12:55:42 localhost dhcpd: DHCPOFFER on 192.168.1.2 to 00:16:ec:cc:d1:f6 via eth0 So it looks like the client is asking for a lease, and the server is responding with one, but the client does not see it...Could it be that the dhcp configuration is sending something the client does not understand? My configuration file looks like this? ddns-update-style interim; allow booting; allow bootp; #if $omapi_enabled omapi-port $omapi_port; #end if ignore client-updates; set vendorclass = option vendor-class-identifier; subnet 192.168.1.0 netmask 255.255.255.0 { option routers 192.168.1.1; option subnet-mask 255.255.255.0; range dynamic-bootp 192.168.1.100 192.168.1.254; filename "pxelinux.0"; default-lease-time 21600; max-lease-time 43200; next-server $next_server; } $insert_cobbler_system_definitions It's weird because the client was getting a lease earlier today, right up to the point where I actually managed to almost install a distro using cobbler (Almost because there was a hiccup in the kickstart template), and since then I've tried various permutations of all the settings including: - removing the system added - removing the profile (Just testing pure dhcp) - Toggling omapi_enabled - Running with non managed dhcp (Similar configuration) - Reinstalling cobbler and setting everything up from scratch - Double check that DHCP is disabled on the router - Completely disabled the firewall - ... I used yum to reinstall and it looks like cobbler-1.0.0-2.fc has made it into the repository now, so that's what I'm running with. Any ideas? TIA, - Ole From ole.ersoy at gmail.com Mon Jun 2 19:06:00 2008 From: ole.ersoy at gmail.com (Ole Ersoy) Date: Mon, 02 Jun 2008 14:06:00 -0500 Subject: [et-mgmt-tools] Cobbler: defining network profiles In-Reply-To: References: Message-ID: <48444498.2080800@gmail.com> +1 James_Martin at ao.uscourts.gov wrote: > Greetings folks. I was working out a RFE with mpdehaan in #cobbler this > morning, and he thought I should post it here to get other folks input. > > https://fedorahosted.org/cobbler/ticket/164 > > I think it would be a great addition to be able to define network profiles > for systems/profiles, etc. > > A network profile would consist of : > > subnet mask default gateway dns server > > I picture it working like this: > > On the CLI: > > First you would define your network profile with the appropriate addresses. > > cobbler add network foonet --netmask=255.255.255.0 --gateway=192.168.1.1 > --dns1=192.168.1.10 --domain=mylab.mycompany.com > > Secondly, when adding a new system, there is the new option of "--network". > So for system foo, which belonged to the foonet, you would do: > > cobbler system add foo --network=foonet ip=192.168.101 --hostname=foo > > This would become very handy especially if you have to re-ip your network, > and its also a nice short cut. > > In the background, my guess is that the information is still stored the > same way, and if a network profile is changed, systems that use it are > synced whenever a cobbler sync occurs. > > In the webui, there would be an option for adding network profiles, and a > drop down for select the network profiles when adding a system. > > > James S. Martin, RHCE > Contractor > Administrative Office of the United States Courts > Washington, DC > (202) 502-2394 > > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > From Pablo.Iranzo at redhat.com Mon Jun 2 19:07:15 2008 From: Pablo.Iranzo at redhat.com (=?UTF-8?Q?Pablo_Iranzo_G=C3=B3mez?=) Date: Mon, 2 Jun 2008 21:07:15 +0200 (CEST) Subject: [et-mgmt-tools] DHCP Troubleshooting In-Reply-To: <484442EF.1070202@gmail.com> References: <484442EF.1070202@gmail.com> Message-ID: Ole, try with authoritative; -- Pablo Iranzo G??mez (http://Alufis35.uv.es/~iranzo/) (PGPKey Available on http://www.uv.es/~iranzop/PGPKey.pgp) -- Postulado de Boling sobre la Ley de Murphy: Si se encuentra bien, no se preocupe. Se le pasar?? On Mon, 2 Jun 2008, Ole Ersoy wrote: > Hi, > > I've been attempting an install for a while now and playing around with a lot of settings. At this point my client just says "No DHCP Lease Offer Received". However /var/log/messages looks like this: > > Jun 2 12:55:05 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via eth0 > Jun 2 12:55:05 localhost dhcpd: DHCPOFFER on 192.168.1.2 to 00:16:ec:cc:d1:f6 via eth0 > Jun 2 12:55:28 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via eth0 > Jun 2 12:55:28 localhost dhcpd: DHCPOFFER on 192.168.1.2 to 00:16:ec:cc:d1:f6 via eth0 > Jun 2 12:55:30 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via eth0 > Jun 2 12:55:30 localhost dhcpd: DHCPOFFER on 192.168.1.2 to 00:16:ec:cc:d1:f6 via eth0 > Jun 2 12:55:34 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via eth0 > Jun 2 12:55:34 localhost dhcpd: DHCPOFFER on 192.168.1.2 to 00:16:ec:cc:d1:f6 via eth0 > Jun 2 12:55:42 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via eth0 > Jun 2 12:55:42 localhost dhcpd: DHCPOFFER on 192.168.1.2 to 00:16:ec:cc:d1:f6 via eth0 > > So it looks like the client is asking for a lease, and the server is responding with one, but the client does not see it...Could it be that the dhcp configuration is sending something the client does not understand? My configuration file looks like this? > > ddns-update-style interim; > > allow booting; > allow bootp; > #if $omapi_enabled > omapi-port $omapi_port; > #end if > > ignore client-updates; > set vendorclass = option vendor-class-identifier; > > subnet 192.168.1.0 netmask 255.255.255.0 { > option routers 192.168.1.1; > option subnet-mask 255.255.255.0; > range dynamic-bootp 192.168.1.100 192.168.1.254; > filename "pxelinux.0"; > default-lease-time 21600; > max-lease-time 43200; > next-server $next_server; > } > > $insert_cobbler_system_definitions > > It's weird because the client was getting a lease earlier today, right up to the point where I actually managed to almost install a distro using cobbler (Almost because there was a hiccup in the kickstart template), and since then I've tried various permutations of all the settings including: > > - removing the system added > - removing the profile (Just testing pure dhcp) > - Toggling omapi_enabled > - Running with non managed dhcp (Similar configuration) > - Reinstalling cobbler and setting everything up from scratch > - Double check that DHCP is disabled on the router > - Completely disabled the firewall > - ... > > I used yum to reinstall and it looks like cobbler-1.0.0-2.fc has made it into the repository now, so that's what I'm running with. > > Any ideas? > > TIA, > - Ole > > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > From ole.ersoy at gmail.com Mon Jun 2 19:29:55 2008 From: ole.ersoy at gmail.com (Ole Ersoy) Date: Mon, 02 Jun 2008 14:29:55 -0500 Subject: [et-mgmt-tools] DHCP Troubleshooting In-Reply-To: References: <484442EF.1070202@gmail.com> Message-ID: <48444A33.6010508@gmail.com> Pablo, I tried. Still no love. I tried it with both cobbler managed dhcp and the non-managed one. This is how I added it to the dhcp.template ddns-update-style interim; authoritative; Does that look right? Thanks, Ole Pablo Iranzo G?mez wrote: > > Ole, try with > > authoritative; > > > > > From Pablo.Iranzo at redhat.com Mon Jun 2 19:49:40 2008 From: Pablo.Iranzo at redhat.com (=?UTF-8?Q?Pablo_Iranzo_G=C3=B3mez?=) Date: Mon, 2 Jun 2008 21:49:40 +0200 (CEST) Subject: [et-mgmt-tools] DHCP Troubleshooting In-Reply-To: <48444A33.6010508@gmail.com> References: <484442EF.1070202@gmail.com> <48444A33.6010508@gmail.com> Message-ID: It looks like that :) Mine is: # ****************************************************************** # Cobbler managed dhcpd.conf file # # generated from cobbler dhcp.conf template ($date) # # ****************************************************************** #option host-name=concat("equipo-",substring(binary-to-ascii(10,8,".",leased-address),9,3)); set vendorclass = option vendor-class-identifier; ddns-update-style interim; use-host-decl-names on; allow unknown-clients; default-lease-time 14400; max-lease-time 28800; authoritative; #if $omapi_enabled omapi-port $omapi_port; #end if option wpad-url code 252 = text; option wpad-url "http://1.1.3.1/wpad.dat "; allow booting; allow bootp; ignore client-updates; filename "/pxelinux.0"; default-lease-time 21600; max-lease-time 43200; next-server $next_server; option domain-name ""; subnet 1.1.1.0 netmask 255.255.255.0 { option domain-name-servers 1.1.1.1; range 1.1.1.3 1.1.1.254; option broadcast-address 1.1.1.255; option routers 1.1.1.1; option netbios-name-servers 1.1.1.1; option netbios-node-type 8; option ntp-servers 1.1.1.1; } $insert_cobbler_system_definitions ? ------------------------------------------------ Change ranges and test on yours just to be sure :) -- Pablo Iranzo G??mez (http://Alufis35.uv.es/~iranzo/) (PGPKey Available on http://www.uv.es/~iranzop/PGPKey.pgp) -- Postulado de Boling sobre la Ley de Murphy: Si se encuentra bien, no se preocupe. Se le pasar?? On Mon, 2 Jun 2008, Ole Ersoy wrote: > Pablo, > > I tried. Still no love. I tried it with both cobbler managed dhcp and the non-managed one. > > This is how I added it to the dhcp.template > > ddns-update-style interim; > authoritative; > > Does that look right? > > Thanks, > Ole > > > Pablo Iranzo G?mez wrote: > > > > Ole, try with > > > > authoritative; > > > > > > > > > > > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > From ole.ersoy at gmail.com Mon Jun 2 20:02:14 2008 From: ole.ersoy at gmail.com (Ole Ersoy) Date: Mon, 02 Jun 2008 15:02:14 -0500 Subject: [et-mgmt-tools] DHCP Troubleshooting In-Reply-To: References: <484442EF.1070202@gmail.com> <48444A33.6010508@gmail.com> Message-ID: <484451C6.3020007@gmail.com> I tried changing the range to 192.168.1.10 - 192.168.1.254. Same result: [root at localhost yum.repos.d]# vi /etc/cobbler/dhcp.template (Did the change) [root at localhost yum.repos.d]# cobbler sync Shutting down dhcpd: [ OK ] Starting dhcpd: [ OK ] [root at localhost yum.repos.d]# tail /var/log/messages Jun 2 14:55:05 localhost dhcpd: Sending on LPF/eth0/00:0e:a6:65:57:99/192.168.1/24 Jun 2 14:55:05 localhost dhcpd: Sending on Socket/fallback/fallback-net Jun 2 14:55:48 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via eth0 Jun 2 14:55:49 localhost dhcpd: DHCPOFFER on 192.168.1.253 to 00:16:ec:cc:d1:f6 via eth0 Jun 2 14:55:50 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via eth0 Jun 2 14:55:50 localhost dhcpd: DHCPOFFER on 192.168.1.253 to 00:16:ec:cc:d1:f6 via eth0 Jun 2 14:55:54 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via eth0 Jun 2 14:55:54 localhost dhcpd: DHCPOFFER on 192.168.1.253 to 00:16:ec:cc:d1:f6 via eth0 Jun 2 14:56:02 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via eth0 Jun 2 14:56:02 localhost dhcpd: DHCPOFFER on 192.168.1.253 to 00:16:ec:cc:d1:f6 via eth0 The client asks, DHCP offers, and the client asks again....weird right? Ole Pablo Iranzo G?mez wrote: > It looks like that :) > > Mine is: > # ****************************************************************** > # Cobbler managed dhcpd.conf file > # > # generated from cobbler dhcp.conf template ($date) > # > # ****************************************************************** > #option > host-name=concat("equipo-",substring(binary-to-ascii(10,8,".",leased-address),9,3)); > > set vendorclass = option vendor-class-identifier; > ddns-update-style interim; > use-host-decl-names on; > allow unknown-clients; > default-lease-time 14400; > max-lease-time 28800; > authoritative; > #if $omapi_enabled > omapi-port $omapi_port; > #end if > option wpad-url code 252 = text; > option wpad-url "http://1.1.3.1/wpad.dat "; > allow booting; > allow bootp; > ignore client-updates; > filename "/pxelinux.0"; > default-lease-time 21600; > max-lease-time 43200; > next-server $next_server; > option domain-name ""; > > subnet 1.1.1.0 netmask 255.255.255.0 { > option domain-name-servers 1.1.1.1; > range 1.1.1.3 1.1.1.254; > option broadcast-address 1.1.1.255; > option routers 1.1.1.1; > option netbios-name-servers 1.1.1.1; > option netbios-node-type 8; > option ntp-servers 1.1.1.1; > } > > > $insert_cobbler_system_definitions > ? > > ------------------------------------------------ > > Change ranges and test on yours just to be sure :) > > > > > > From wright at imageworks.com Mon Jun 2 20:53:40 2008 From: wright at imageworks.com (Peter Wright) Date: Mon, 2 Jun 2008 13:53:40 -0700 Subject: [et-mgmt-tools] Cobbler: defining network profiles In-Reply-To: References: Message-ID: <48445DD4.4050404@imageworks.com> James_Martin at ao.uscourts.gov wrote: > Greetings folks. I was working out a RFE with mpdehaan in #cobbler this > morning, and he thought I should post it here to get other folks input. > > https://fedorahosted.org/cobbler/ticket/164 > > I think it would be a great addition to be able to define network profiles > for systems/profiles, etc. > > A network profile would consist of : > > subnet mask default gateway dns server > > hmm - that's an interesting idea. that would make IP'ing workstations here a little easier, and less error prone. it would be very helpful for sites that have a ton of VLANs - with this method you could have your senior admins create profiles for all your VLANs ahead of time - then easily have your junior admins assign network profiles based on the location of a desktop for example (we use a separate VLAN for each teleco closet here - and system moves are pretty frequent unfortunately). > In the background, my guess is that the information is still stored the > same way, and if a network profile is changed, systems that use it are > synced whenever a cobbler sync occurs. > Yea that would be best I think - you may want to make these changes to many systems for example, but only have dhcpd change it's config after a sync. great idea! -pete -- Peter Wright Systems Engineer Sony Pictures Imageworks wright at imageworks.com www.imageworks.com From Georgi.Hristov at fnis.com Mon Jun 2 21:31:02 2008 From: Georgi.Hristov at fnis.com (Hristov, Georgi) Date: Mon, 2 Jun 2008 16:31:02 -0500 Subject: [et-mgmt-tools] Cobbler: defining network profiles In-Reply-To: <48445DD4.4050404@imageworks.com> References: <48445DD4.4050404@imageworks.com> Message-ID: <0EC8C503E6E98647B0BEDDA7351301EAFD0C14@CMBFISLTC02.FNFIS.COM> This reminds me a lot of AIX NIM (Network Installation Manager http://www.redbooks.ibm.com/abstracts/sg247296.html). NIM has similar functionality. Actually, NIM would even setup a static route on a provisioned system if the system is being installed via a secondary NIC. This functionality is made possible via the knowledge of networks, similar to what is being discussed here. -Georgi -----Original Message----- From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Peter Wright Sent: Monday, June 02, 2008 15:54 To: Fedora/Linux Management Tools Subject: Re: [et-mgmt-tools] Cobbler: defining network profiles James_Martin at ao.uscourts.gov wrote: > Greetings folks. I was working out a RFE with mpdehaan in #cobbler this > morning, and he thought I should post it here to get other folks input. > > https://fedorahosted.org/cobbler/ticket/164 > > I think it would be a great addition to be able to define network profiles > for systems/profiles, etc. > > A network profile would consist of : > > subnet mask default gateway dns server > > hmm - that's an interesting idea. that would make IP'ing workstations here a little easier, and less error prone. it would be very helpful for sites that have a ton of VLANs - with this method you could have your senior admins create profiles for all your VLANs ahead of time - then easily have your junior admins assign network profiles based on the location of a desktop for example (we use a separate VLAN for each teleco closet here - and system moves are pretty frequent unfortunately). > In the background, my guess is that the information is still stored the > same way, and if a network profile is changed, systems that use it are > synced whenever a cobbler sync occurs. > Yea that would be best I think - you may want to make these changes to many systems for example, but only have dhcpd change it's config after a sync. great idea! -pete -- Peter Wright Systems Engineer Sony Pictures Imageworks wright at imageworks.com www.imageworks.com _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools at redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools ______________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. _____________ From wright at imageworks.com Mon Jun 2 22:02:42 2008 From: wright at imageworks.com (Peter Wright) Date: Mon, 2 Jun 2008 15:02:42 -0700 Subject: [et-mgmt-tools] Cobbler: defining network profiles In-Reply-To: <0EC8C503E6E98647B0BEDDA7351301EAFD0C14@CMBFISLTC02.FNFIS.COM> References: <48445DD4.4050404@imageworks.com> <0EC8C503E6E98647B0BEDDA7351301EAFD0C14@CMBFISLTC02.FNFIS.COM> Message-ID: <48446E02.7070507@imageworks.com> Hristov, Georgi wrote: > This reminds me a lot of AIX NIM (Network Installation Manager > http://www.redbooks.ibm.com/abstracts/sg247296.html). NIM has similar > functionality. Actually, NIM would even setup a static route on a > provisioned system if the system is being installed via a secondary NIC. > This functionality is made possible via the knowledge of networks, > similar to what is being discussed here. > > Hmm - I think this is a little different, unless I misunderstand the proposal. Since I think most sites are using dhcp reservations, I think the proposed patch is to break out the IP management functionality from the "cobbler system" command set. -pete > -Georgi > > > -----Original Message----- > From: et-mgmt-tools-bounces at redhat.com > [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Peter Wright > Sent: Monday, June 02, 2008 15:54 > To: Fedora/Linux Management Tools > Subject: Re: [et-mgmt-tools] Cobbler: defining network profiles > > James_Martin at ao.uscourts.gov wrote: > >> Greetings folks. I was working out a RFE with mpdehaan in #cobbler >> > this > >> morning, and he thought I should post it here to get other folks >> > input. > >> https://fedorahosted.org/cobbler/ticket/164 >> >> I think it would be a great addition to be able to define network >> > profiles > >> for systems/profiles, etc. >> >> A network profile would consist of : >> >> subnet mask default gateway dns server >> >> >> > hmm - that's an interesting idea. that would make IP'ing workstations > here a little easier, and less error prone. > > it would be very helpful for sites that have a ton of VLANs - with this > method you could have your senior admins create profiles for all your > VLANs ahead of time - then easily have your junior admins assign network > > profiles based on the location of a desktop for example (we use a > separate VLAN for each teleco closet here - and system moves are pretty > frequent unfortunately). > > > >> In the background, my guess is that the information is still stored >> > the > >> same way, and if a network profile is changed, systems that use it are >> synced whenever a cobbler sync occurs. >> >> > Yea that would be best I think - you may want to make these changes to > many systems for example, but only have dhcpd change it's config after a > > sync. > > great idea! > > -pete > > -- Peter Wright Systems Engineer Sony Pictures Imageworks wright at imageworks.com www.imageworks.com From mdehaan at redhat.com Mon Jun 2 22:21:08 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Mon, 02 Jun 2008 18:21:08 -0400 Subject: [et-mgmt-tools] Cobbler: defining network profiles In-Reply-To: <48446E02.7070507@imageworks.com> References: <48445DD4.4050404@imageworks.com> <0EC8C503E6E98647B0BEDDA7351301EAFD0C14@CMBFISLTC02.FNFIS.COM> <48446E02.7070507@imageworks.com> Message-ID: <48447254.9070600@redhat.com> Peter Wright wrote: > > Hristov, Georgi wrote: >> This reminds me a lot of AIX NIM (Network Installation Manager >> http://www.redbooks.ibm.com/abstracts/sg247296.html). NIM has similar >> functionality. Actually, NIM would even setup a static route on a >> provisioned system if the system is being installed via a secondary NIC. >> This functionality is made possible via the knowledge of networks, >> similar to what is being discussed here. >> > Hmm - I think this is a little different, unless I misunderstand the > proposal. Since I think most sites are using dhcp reservations, I > think the proposed patch is to break out the IP management > functionality from the "cobbler system" command set. > > -pete Pete's correct though I haven't looked into the above much. It would work for static configs as well as DHCP reservations. Certaintly DHCP reservations are preferred and much much easier, though in the static case, all of the added variables are still very nice to have for kickstart templates. To get a bit technical, the previous way of working will still work. cobbler system add --name=foo --ip=foo1 --mac=foo2 --gateway=foo3 --subnet=foo4 Except that (as proposed) I see this as having each interface will now have an additional shortcut that will fill in the others if they are not already set. cobbler system add --name=foo --network=alpha This would not actually store the IP and data with each system, but would fill them in from the alpha part. Possibly this could be smart enough to pick ips's from within the netmask. If doing this, we probably do something internally like assigning the --ip field to a special counter like maybe "*1", "*2", and so on, and then let blender() in utils.py calculate it using the netmask. For those not familiar with the point of blender, it's that in Cobbler, everything is generated from a tree that overrides things on the way down. Systems override profiles, subprofiles if present override their parents, profiles override distros. This function ensures that all of the variables that appear in DHCP and elsewhere represent that configuration once it is evaluated. So this would in theory allow reassigning the subnet with a: "cobbler network edit --name=alpha --subnet=foo5 && cobbler sync" And then not having to update any of the system objects. We'd just need to have a way to give them all nice unique ID's so the DHCP reservations remain intact when we add new records, so something like assigning the first free increasing integer to the system and storing it there and then doing some simple math to align those with the subnets should be sufficient. We'd want to make sure that if we added a two hundred systems, then deleted a hundred, the next one added starts back at the first free slot, and that adding systems didn't move the reservations around. This is probably pretty simple to do. More people here probably have better network management expertise than I do, so let me know if I'm missing something in terms of use cases and so forth. cobbler could also probably ship with "default" networking parameters in /etc/cobbler/settings too, so many people would not have to create their own networking object. I handle kernel options something like this, so if someone defines their subnet there and enables DHCP management, reservations would then start working and automatically handing out IPs. We'd probably also want an additional configuration setting to decide whether or not to start handing them out in the block, probably defaulted off, with good comments in the settings file about how that would all play together. Very interesting idea folks! --Michael From Pablo.Iranzo at redhat.com Mon Jun 2 22:26:13 2008 From: Pablo.Iranzo at redhat.com (=?UTF-8?Q?Pablo_Iranzo_G=C3=B3mez?=) Date: Tue, 3 Jun 2008 00:26:13 +0200 (CEST) Subject: [et-mgmt-tools] DHCP Troubleshooting In-Reply-To: <484451C6.3020007@gmail.com> References: <484442EF.1070202@gmail.com> <48444A33.6010508@gmail.com> <484451C6.3020007@gmail.com> Message-ID: When I got that was because my client has an invalid mac address, but your's looks ok, try changing mac address (if you can) on your client with ifconfig eth0 hw ether 00:01:02:03:04:05 and then run dhclient eth0 to check if this does the trick, if so, will look into clearing leases and host entries to make it start from zero. Regards Pablo -- Pablo Iranzo G?mez (http://Alufis35.uv.es/~iranzo/) (PGPKey Available on http://www.uv.es/~iranzop/PGPKey.pgp) -- Postulado de Boling sobre la Ley de Murphy: Si se encuentra bien, no se preocupe. Se le pasar? On Mon, 2 Jun 2008, Ole Ersoy wrote: > I tried changing the range to 192.168.1.10 - 192.168.1.254. Same result: > > [root at localhost yum.repos.d]# vi /etc/cobbler/dhcp.template (Did the change) > [root at localhost yum.repos.d]# cobbler sync > Shutting down dhcpd: [ OK ] > Starting dhcpd: [ OK ] > [root at localhost yum.repos.d]# tail /var/log/messages > Jun 2 14:55:05 localhost dhcpd: Sending on LPF/eth0/00:0e:a6:65:57:99/192.168.1/24 > Jun 2 14:55:05 localhost dhcpd: Sending on Socket/fallback/fallback-net > Jun 2 14:55:48 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via eth0 > Jun 2 14:55:49 localhost dhcpd: DHCPOFFER on 192.168.1.253 to 00:16:ec:cc:d1:f6 via eth0 > Jun 2 14:55:50 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via eth0 > Jun 2 14:55:50 localhost dhcpd: DHCPOFFER on 192.168.1.253 to 00:16:ec:cc:d1:f6 via eth0 > Jun 2 14:55:54 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via eth0 > Jun 2 14:55:54 localhost dhcpd: DHCPOFFER on 192.168.1.253 to 00:16:ec:cc:d1:f6 via eth0 > Jun 2 14:56:02 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via eth0 > Jun 2 14:56:02 localhost dhcpd: DHCPOFFER on 192.168.1.253 to 00:16:ec:cc:d1:f6 via eth0 > > The client asks, DHCP offers, and the client asks again....weird right? > > Ole > > > > > Pablo Iranzo G?mez wrote: > > It looks like that :) > > > > Mine is: > > # ****************************************************************** > > # Cobbler managed dhcpd.conf file > > # > > # generated from cobbler dhcp.conf template ($date) > > # > > # ****************************************************************** > > #option > > host-name=concat("equipo-",substring(binary-to-ascii(10,8,".",leased-address),9,3)); > > > > set vendorclass = option vendor-class-identifier; > > ddns-update-style interim; > > use-host-decl-names on; > > allow unknown-clients; > > default-lease-time 14400; > > max-lease-time 28800; > > authoritative; > > #if $omapi_enabled > > omapi-port $omapi_port; > > #end if > > option wpad-url code 252 = text; > > option wpad-url "http://1.1.3.1/wpad.dat "; > > allow booting; > > allow bootp; > > ignore client-updates; > > filename "/pxelinux.0"; > > default-lease-time 21600; > > max-lease-time 43200; > > next-server $next_server; > > option domain-name ""; > > > > subnet 1.1.1.0 netmask 255.255.255.0 { > > option domain-name-servers 1.1.1.1; > > range 1.1.1.3 1.1.1.254; > > option broadcast-address 1.1.1.255; > > option routers 1.1.1.1; > > option netbios-name-servers 1.1.1.1; > > option netbios-node-type 8; > > option ntp-servers 1.1.1.1; > > } > > > > > > $insert_cobbler_system_definitions > > ? > > > > ------------------------------------------------ > > > > Change ranges and test on yours just to be sure :) > > > > > > > > > > > > > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > From tom at ng23.net Tue Jun 3 13:59:43 2008 From: tom at ng23.net (Tom Brown) Date: Tue, 03 Jun 2008 14:59:43 +0100 Subject: [et-mgmt-tools] koan-0.8.0-1.el5 - RHEL5 u2 - Xen/libvirt Issue Message-ID: <48454E4F.5090804@ng23.net> Hi Trying to create virt machines on a RHEL5u2 dom0 and during the configuration by koan i get the following. libvir: Xen error : Domain not found: xenUnifiedDomainLookupByUUID libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName I also notice that the filesystem is only 1 gig whereas its set to 5 gig in the profile. Does anyone know if there is an issue with libvirt or something in RHEL5u2 or should i be using a newer koan? thanks From tom at ng23.net Tue Jun 3 14:21:03 2008 From: tom at ng23.net (Tom Brown) Date: Tue, 03 Jun 2008 15:21:03 +0100 Subject: [et-mgmt-tools] koan-0.8.0-1.el5 - RHEL5 u2 - Xen/libvirt Issue In-Reply-To: <48454E4F.5090804@ng23.net> References: <48454E4F.5090804@ng23.net> Message-ID: <4845534F.60301@ng23.net> > > > Trying to create virt machines on a RHEL5u2 dom0 and during the > configuration by koan i get the following. > > libvir: Xen error : Domain not found: xenUnifiedDomainLookupByUUID > libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName > > I also notice that the filesystem is only 1 gig whereas its set to 5 > gig in the profile. > > Does anyone know if there is an issue with libvirt or something in > RHEL5u2 or should i be using a newer koan? > i notice that this issue seems to be similar to http://www.mail-archive.com/et-mgmt-tools at redhat.com/msg00999.html however my vm is created but the filesystem size is not correct - any ideas? thanks From mdehaan at redhat.com Tue Jun 3 14:28:36 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Tue, 03 Jun 2008 10:28:36 -0400 Subject: [et-mgmt-tools] koan-0.8.0-1.el5 - RHEL5 u2 - Xen/libvirt Issue In-Reply-To: <48454E4F.5090804@ng23.net> References: <48454E4F.5090804@ng23.net> Message-ID: <48455514.60503@redhat.com> Tom Brown wrote: > Hi > > Trying to create virt machines on a RHEL5u2 dom0 and during the > configuration by koan i get the following. > > libvir: Xen error : Domain not found: xenUnifiedDomainLookupByUUID > libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName > > I also notice that the filesystem is only 1 gig whereas its set to 5 > gig in the profile. What version of Cobbler and koan? > > Does anyone know if there is an issue with libvirt or something in > RHEL5u2 or should i be using a newer koan? > > thanks > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From tom at ng23.net Tue Jun 3 14:31:15 2008 From: tom at ng23.net (Tom Brown) Date: Tue, 03 Jun 2008 15:31:15 +0100 Subject: [et-mgmt-tools] koan-0.8.0-1.el5 - RHEL5 u2 - Xen/libvirt Issue In-Reply-To: <48455514.60503@redhat.com> References: <48454E4F.5090804@ng23.net> <48455514.60503@redhat.com> Message-ID: <484555B3.4060909@ng23.net> Michael DeHaan wrote: > Tom Brown wrote: >> Hi >> >> Trying to create virt machines on a RHEL5u2 dom0 and during the >> configuration by koan i get the following. >> >> libvir: Xen error : Domain not found: xenUnifiedDomainLookupByUUID >> libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName >> >> I also notice that the filesystem is only 1 gig whereas its set to 5 >> gig in the profile. > > What version of Cobbler and koan? > cobbler-0.8.2-1 - RHEL4 u5 koan-0.8.0-1.el5 - RHEL5 u2 thanks From mdehaan at redhat.com Tue Jun 3 14:36:21 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Tue, 03 Jun 2008 10:36:21 -0400 Subject: [et-mgmt-tools] koan-0.8.0-1.el5 - RHEL5 u2 - Xen/libvirt Issue In-Reply-To: <484555B3.4060909@ng23.net> References: <48454E4F.5090804@ng23.net> <48455514.60503@redhat.com> <484555B3.4060909@ng23.net> Message-ID: <484556E5.40606@redhat.com> Tom Brown wrote: > Michael DeHaan wrote: >> Tom Brown wrote: >>> Hi >>> >>> Trying to create virt machines on a RHEL5u2 dom0 and during the >>> configuration by koan i get the following. >>> >>> libvir: Xen error : Domain not found: xenUnifiedDomainLookupByUUID >>> libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName >>> >>> I also notice that the filesystem is only 1 gig whereas its set to 5 >>> gig in the profile. >> >> What version of Cobbler and koan? > > > cobbler-0.8.2-1 - RHEL4 u5 > koan-0.8.0-1.el5 - RHEL5 u2 > Regarding the stale data, please upgrade to the latest release (1.0) of each. While I do not think koan required any explicit restarts of cobblerd to apply changes to koan, it very well could have. This should be streamlined in 1.0 (so things are fully dynamic) and I would need to know if it's not so I can fix it. I expect it works fine there. As for the above messages from Xen, I'm not sure they are actual errors, or if they are just noise. I believe they are just noise, as with the "GET" failed message you'll also see when running installs. Can anyone on the libvirt side of things confirm where that's coming from? --Michael From tom at ng23.net Tue Jun 3 14:43:11 2008 From: tom at ng23.net (Tom Brown) Date: Tue, 03 Jun 2008 15:43:11 +0100 Subject: [et-mgmt-tools] koan-0.8.0-1.el5 - RHEL5 u2 - Xen/libvirt Issue In-Reply-To: <484556E5.40606@redhat.com> References: <48454E4F.5090804@ng23.net> <48455514.60503@redhat.com> <484555B3.4060909@ng23.net> <484556E5.40606@redhat.com> Message-ID: <4845587F.6020209@ng23.net> > > Regarding the stale data, please upgrade to the latest release (1.0) > of each. While I do not think koan required any explicit restarts of > cobblerd to apply changes to koan, it very well could have. This > should be streamlined in 1.0 (so things are fully dynamic) and I would > need to know if it's not so I can fix it. I expect it works fine there. > > As for the above messages from Xen, I'm not sure they are actual > errors, or if they are just noise. I believe they are just noise, as > with the "GET" failed message you'll also see when running installs. > Can anyone on the libvirt side of things confirm where that's coming > from? > --Michael > > i dont see a .src.rpm on http://cobbler.et.redhat.com/download/ for koan - could you point me to one? upping my cobbler version will be slightly more tricky as its a very in use system at the moment. thanks From mdehaan at redhat.com Tue Jun 3 14:50:09 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Tue, 03 Jun 2008 10:50:09 -0400 Subject: [et-mgmt-tools] koan-0.8.0-1.el5 - RHEL5 u2 - Xen/libvirt Issue In-Reply-To: <4845587F.6020209@ng23.net> References: <48454E4F.5090804@ng23.net> <48455514.60503@redhat.com> <484555B3.4060909@ng23.net> <484556E5.40606@redhat.com> <4845587F.6020209@ng23.net> Message-ID: <48455A21.9010900@redhat.com> Tom Brown wrote: > >> >> Regarding the stale data, please upgrade to the latest release (1.0) >> of each. While I do not think koan required any explicit restarts >> of cobblerd to apply changes to koan, it very well could have. This >> should be streamlined in 1.0 (so things are fully dynamic) and I >> would need to know if it's not so I can fix it. I expect it works >> fine there. >> >> As for the above messages from Xen, I'm not sure they are actual >> errors, or if they are just noise. I believe they are just noise, >> as with the "GET" failed message you'll also see when running >> installs. Can anyone on the libvirt side of things confirm where >> that's coming from? >> --Michael >> >> > > i dont see a .src.rpm on http://cobbler.et.redhat.com/download/ for > koan - could you point me to one? > > upping my cobbler version will be slightly more tricky as its a very > in use system at the moment. > > thanks > > This is it, http://cobbler.et.redhat.com/download/koan-1.0.0-1.fc8.src.rpm, you can ignore the "fc8" in the name and I'll rename it shortly. Basically I don't provide backport fixes for previous major release numbers (i.e. 0.6, 0.8). Currently 1.0 is the version that will receive fixes. --Michael From crobinso at redhat.com Tue Jun 3 14:57:03 2008 From: crobinso at redhat.com (Cole Robinson) Date: Tue, 03 Jun 2008 10:57:03 -0400 Subject: [et-mgmt-tools] koan-0.8.0-1.el5 - RHEL5 u2 - Xen/libvirt Issue In-Reply-To: <484556E5.40606@redhat.com> References: <48454E4F.5090804@ng23.net> <48455514.60503@redhat.com> <484555B3.4060909@ng23.net> <484556E5.40606@redhat.com> Message-ID: <48455BBF.50705@redhat.com> Michael DeHaan wrote: > Tom Brown wrote: >> Michael DeHaan wrote: >>> Tom Brown wrote: >>>> Hi >>>> >>>> Trying to create virt machines on a RHEL5u2 dom0 and during the >>>> configuration by koan i get the following. >>>> >>>> libvir: Xen error : Domain not found: xenUnifiedDomainLookupByUUID >>>> libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName >>>> >>>> I also notice that the filesystem is only 1 gig whereas its set to 5 >>>> gig in the profile. >>> What version of Cobbler and koan? >> >> cobbler-0.8.2-1 - RHEL4 u5 >> koan-0.8.0-1.el5 - RHEL5 u2 >> > > Regarding the stale data, please upgrade to the latest release (1.0) of > each. While I do not think koan required any explicit restarts of > cobblerd to apply changes to koan, it very well could have. This > should be streamlined in 1.0 (so things are fully dynamic) and I would > need to know if it's not so I can fix it. I expect it works fine there. > > As for the above messages from Xen, I'm not sure they are actual errors, > or if they are just noise. I believe they are just noise, as with the > "GET" failed message you'll also see when running installs. Can anyone > on the libvirt side of things confirm where that's coming from? > > --Michael > Pretty certain you are correct: those messages are harmless. The virt install libraries use those calls to make sure a new guest doesn't collide with an existing guest, but doesn't correctly hide the error message. This is fixed upstream, fyi. - Cole From mdehaan at redhat.com Tue Jun 3 15:01:22 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Tue, 03 Jun 2008 11:01:22 -0400 Subject: [et-mgmt-tools] koan-0.8.0-1.el5 - RHEL5 u2 - Xen/libvirt Issue In-Reply-To: <48455BBF.50705@redhat.com> References: <48454E4F.5090804@ng23.net> <48455514.60503@redhat.com> <484555B3.4060909@ng23.net> <484556E5.40606@redhat.com> <48455BBF.50705@redhat.com> Message-ID: <48455CC2.1090606@redhat.com> Cole Robinson wrote: > Michael DeHaan wrote: > >> Tom Brown wrote: >> >>> Michael DeHaan wrote: >>> >>>> Tom Brown wrote: >>>> >>>>> Hi >>>>> >>>>> Trying to create virt machines on a RHEL5u2 dom0 and during the >>>>> configuration by koan i get the following. >>>>> >>>>> libvir: Xen error : Domain not found: xenUnifiedDomainLookupByUUID >>>>> libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName >>>>> >>>>> I also notice that the filesystem is only 1 gig whereas its set to 5 >>>>> gig in the profile. >>>>> >>>> What version of Cobbler and koan? >>>> >>> cobbler-0.8.2-1 - RHEL4 u5 >>> koan-0.8.0-1.el5 - RHEL5 u2 >>> >>> >> Regarding the stale data, please upgrade to the latest release (1.0) of >> each. While I do not think koan required any explicit restarts of >> cobblerd to apply changes to koan, it very well could have. This >> should be streamlined in 1.0 (so things are fully dynamic) and I would >> need to know if it's not so I can fix it. I expect it works fine there. >> >> As for the above messages from Xen, I'm not sure they are actual errors, >> or if they are just noise. I believe they are just noise, as with the >> "GET" failed message you'll also see when running installs. Can anyone >> on the libvirt side of things confirm where that's coming from? >> >> --Michael >> >> > > Pretty certain you are correct: those messages are harmless. The virt > install libraries use those calls to make sure a new guest doesn't > collide with an existing guest, but doesn't correctly hide the error > message. This is fixed upstream, fyi. > > Awesome, thanks! > - Cole > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > From ole.ersoy at gmail.com Tue Jun 3 15:06:08 2008 From: ole.ersoy at gmail.com (Ole Ersoy) Date: Tue, 03 Jun 2008 10:06:08 -0500 Subject: [et-mgmt-tools] DHCP Troubleshooting In-Reply-To: References: <484442EF.1070202@gmail.com> <48444A33.6010508@gmail.com> <484451C6.3020007@gmail.com> Message-ID: <48455DE0.5020705@gmail.com> Pablo, In the process of doing what you described below, I noticed the the mask on my network card was set to 255.255.255.240, and on the dhcp configuration I have 255.255.255.0. So I changed the mask on on the network card's configuration (/etc/syscconfig/networking/device/eth0-cfg - For any future thread followers) and now it gets a lease! Thanks again for all the troubleshooting tips. Ole Pablo Iranzo G?mez wrote: > When I got that was because my client has an invalid mac address, > but your's looks ok, try changing mac address (if you can) on your client > with ifconfig eth0 hw ether 00:01:02:03:04:05 and then run dhclient eth0 > to check if this does the trick, if so, will look into clearing leases and > host entries to make it start from zero. > > Regards > Pablo > > From ole.ersoy at gmail.com Tue Jun 3 16:21:18 2008 From: ole.ersoy at gmail.com (Ole Ersoy) Date: Tue, 03 Jun 2008 11:21:18 -0500 Subject: [et-mgmt-tools] TFTP Troubleshooting In-Reply-To: References: <484442EF.1070202@gmail.com> <48444A33.6010508@gmail.com> <484451C6.3020007@gmail.com> Message-ID: <48456F7E.6060904@gmail.com> Hi, Earlier I got TFTP timeouts because the firewall was not configured right, so I just turned the whole thing off, and then TFTP worked. The firewall is still off, but now I'm getting "TFTP Timeout" on the client. I checked that xinetd is running, and ran cobbler check, which is fine. Any ideas on how to troubleshoot from this point? TIA, - Ole From tom at ng23.net Tue Jun 3 16:23:54 2008 From: tom at ng23.net (Tom Brown) Date: Tue, 03 Jun 2008 17:23:54 +0100 Subject: [et-mgmt-tools] TFTP Troubleshooting In-Reply-To: <48456F7E.6060904@gmail.com> References: <484442EF.1070202@gmail.com> <48444A33.6010508@gmail.com> <484451C6.3020007@gmail.com> <48456F7E.6060904@gmail.com> Message-ID: <4845701A.9080501@ng23.net> > > > Earlier I got TFTP timeouts because the firewall was not configured > right, so I just turned the whole thing off, and then TFTP worked. > The firewall is still off, but now I'm getting "TFTP Timeout" on the > client. I checked that xinetd is running, and ran cobbler check, > which is fine. Any ideas on how to troubleshoot from this point? check that it is not disabled in xinet.d From ole.ersoy at gmail.com Tue Jun 3 16:31:33 2008 From: ole.ersoy at gmail.com (Ole Ersoy) Date: Tue, 03 Jun 2008 11:31:33 -0500 Subject: [et-mgmt-tools] TFTP Troubleshooting In-Reply-To: <4845701A.9080501@ng23.net> References: <484442EF.1070202@gmail.com> <48444A33.6010508@gmail.com> <484451C6.3020007@gmail.com> <48456F7E.6060904@gmail.com> <4845701A.9080501@ng23.net> Message-ID: <484571E5.7070901@gmail.com> Tom, I did check that :-). My configuration looks like this: # default: off service tftp { disable = no socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /tftpboot per_source = 11 cps = 100 2 flags = IPv4 } Thanks, - Ole From mdehaan at redhat.com Tue Jun 3 17:39:42 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Tue, 03 Jun 2008 13:39:42 -0400 Subject: [et-mgmt-tools] TFTP Troubleshooting In-Reply-To: <484571E5.7070901@gmail.com> References: <484442EF.1070202@gmail.com> <48444A33.6010508@gmail.com> <484451C6.3020007@gmail.com> <48456F7E.6060904@gmail.com> <4845701A.9080501@ng23.net> <484571E5.7070901@gmail.com> Message-ID: <484581DE.5080207@redhat.com> Ole Ersoy wrote: > Tom, > > I did check that :-). My configuration looks like this: > > # default: off > service tftp > { > disable = no > socket_type = dgram > protocol = udp > wait = yes > user = root > server = /usr/sbin/in.tftpd > server_args = -s /tftpboot > per_source = 11 > cps = 100 2 > flags = IPv4 > } > > Thanks, > - Ole > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools Stick "-vvv" after "-s /tftpboot" and check /var/log/messages and compare them with the messages you are seeing on the client. If it helps to convey what you are seeing, take a picture of the booting client with a camera. Share the text of both. Generally debugging TFTP, firewalls, and network setup is off-topic for this list as it doesn't pertain directly to Cobbler or the virt tools, a good place for this if you can join is #cobbler on irc.freenode.net. --Michael From ole.ersoy at gmail.com Tue Jun 3 18:18:42 2008 From: ole.ersoy at gmail.com (Ole Ersoy) Date: Tue, 03 Jun 2008 13:18:42 -0500 Subject: [et-mgmt-tools] TFTP Troubleshooting In-Reply-To: <484581DE.5080207@redhat.com> References: <484442EF.1070202@gmail.com> <48444A33.6010508@gmail.com> <484451C6.3020007@gmail.com> <48456F7E.6060904@gmail.com> <4845701A.9080501@ng23.net> <484571E5.7070901@gmail.com> <484581DE.5080207@redhat.com> Message-ID: <48458B02.1040505@gmail.com> Michael, I put -vvv in like this: server_args = -s /tftpboot -vvv Then restarted xinetd + ran cobbler sync (Just in case). /var/log/messages looks like this (From this last attempt): Jun 3 13:07:55 localhost dhcpd: DHCPDISCOVER from 00:16:ec:cc:d1:f6 via eth0 Jun 3 13:07:55 localhost dhcpd: DHCPOFFER on 192.168.1.2 to 00:16:ec:cc:d1:f6 via eth0 Jun 3 13:07:57 localhost dhcpd: DHCPREQUEST for 192.168.1.2 (192.168.1.6) from 00:16:ec:cc:d1:f6 via eth0 Jun 3 13:07:57 localhost dhcpd: DHCPACK on 192.168.1.2 to 00:16:ec:cc:d1:f6 via eth0 I attached a picture of my monitor. > Generally debugging TFTP, firewalls, and network setup is off-topic for > this list as it doesn't pertain directly to Cobbler or the virt tools, a > good place for this if you can join is #cobbler on irc.freenode.net. Oh Maan - I have to get out of my email zone? OK - I'll check it out :-). Thanks, - Ole -------------- next part -------------- A non-text attachment was scrubbed... Name: tftp.jpg Type: image/jpeg Size: 1315284 bytes Desc: not available URL: From mdehaan at redhat.com Tue Jun 3 18:54:23 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Tue, 03 Jun 2008 14:54:23 -0400 Subject: [et-mgmt-tools] TFTP Troubleshooting In-Reply-To: <48458B02.1040505@gmail.com> References: <484442EF.1070202@gmail.com> <48444A33.6010508@gmail.com> <484451C6.3020007@gmail.com> <48456F7E.6060904@gmail.com> <4845701A.9080501@ng23.net> <484571E5.7070901@gmail.com> <484581DE.5080207@redhat.com> <48458B02.1040505@gmail.com> Message-ID: <4845935F.6070906@redhat.com> > > > I attached a picture of my monitor. We narrowed this down on IRC, and the "next-server" setting (which is in /etc/dhcpd.conf) was not set to the Cobbler server, but to another box that wasn't running TFTP, hence the open timeout. So, good deal :) --Michael From mdehaan at redhat.com Tue Jun 3 20:39:47 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Tue, 03 Jun 2008 16:39:47 -0400 Subject: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) Message-ID: <4845AC13.7080400@redhat.com> Since 1.0.1 was a big release, I decided to do a quick bugfix release to close some of the items found in the first week by all of you on the lists. There may be another bugfix release 1.0.2 depending on what gets reported. Meanwhile work will continue on 1.1.X (devel branch) -- items with easy workarounds that are in borderline bug/enhancement territory will probably be fixed there instead. - Tue Jun 03 2008 - 1.0.1 - Fix misformatted warning in "check" (with inherited profiles) - Do not have RPM own tftpboot, just generate files in TFTP dir as detected - Default arches to 'i386' not 'x86' for consistency, esp. in import - When querying kickstart templates, do not return directories - Make triggers for add/delete work for renames and copies (same triggers) - Do not cache snippets so they can be tweaked w/o starting the service - Make manpage reference /etc/cobbler/settings, not /var/lib - Added manage_forward_zones/manage_reverse_zones to included config file There is a new source RPM for cobbler available at http://cobbler.et.redhat.com/download No update for koan is needed and this will all hit the mirrors eventually :) Thanks! --Michael From jboyer at liquidnet.com Tue Jun 3 20:51:06 2008 From: jboyer at liquidnet.com (Joseph Boyer Jr.) Date: Tue, 3 Jun 2008 16:51:06 -0400 Subject: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) In-Reply-To: <4845AC13.7080400@redhat.com> References: <4845AC13.7080400@redhat.com> Message-ID: <26AA63832ED7774DBFB9FFB39B337C00243C68F4@nj0cech03.lnholdings.com> FYI: Just built cobbler 1.0.1 on RHEL 5.1 with all the latest updates and cobbler 1.0.1 errors on install FYI: cobbler 1.0.0-2 built and works..... # rpm -ivh /usr/src/redhat/RPMS/noarch/cobbler-1.0.1-1.noarch.rpm Preparing... ########################################### [100%] 1:cobbler ########################################### [100%] Traceback (most recent call last): File "/usr/bin/cobbler", line 17, in ? import cobbler.cobbler as app File "/usr/lib/python2.4/site-packages/cobbler/cobbler.py", line 18, in ? import api File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 17, in ? import config File "/usr/lib/python2.4/site-packages/cobbler/config.py", line 23, in ? import collection_distros as distros File "/usr/lib/python2.4/site-packages/cobbler/collection_distros.py", line 17, in ? import collection File "/usr/lib/python2.4/site-packages/cobbler/collection.py", line 129 self.api.profiles().add(k, save=True, with_sync=with_sync, with_triggers=with_triggers,save=True) SyntaxError: duplicate keyword argument ny0ckss01:/var/www # cobbler check Traceback (most recent call last): File "/usr/bin/cobbler", line 17, in ? import cobbler.cobbler as app File "/usr/lib/python2.4/site-packages/cobbler/cobbler.py", line 18, in ? import api File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 17, in ? import config File "/usr/lib/python2.4/site-packages/cobbler/config.py", line 23, in ? import collection_distros as distros File "/usr/lib/python2.4/site-packages/cobbler/collection_distros.py", line 17, in ? import collection File "/usr/lib/python2.4/site-packages/cobbler/collection.py", line 129 self.api.profiles().add(k, save=True, with_sync=with_sync, with_triggers=with_triggers,save=True) SyntaxError: duplicate keyword argument Joseph Boyer Jr Enterprise Technology Services Liquidnet Holdings, Inc. Joseph.Boyer at liquidnet.com T +1 646.660.8352 C +1 646.284.8394 -----Original Message----- From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Michael DeHaan Sent: Tuesday, June 03, 2008 4:40 PM To: 'et-mgmt-tools at redhat.com' Subject: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) Since 1.0.1 was a big release, I decided to do a quick bugfix release to close some of the items found in the first week by all of you on the lists. There may be another bugfix release 1.0.2 depending on what gets reported. Meanwhile work will continue on 1.1.X (devel branch) -- items with easy workarounds that are in borderline bug/enhancement territory will probably be fixed there instead. - Tue Jun 03 2008 - 1.0.1 - Fix misformatted warning in "check" (with inherited profiles) - Do not have RPM own tftpboot, just generate files in TFTP dir as detected - Default arches to 'i386' not 'x86' for consistency, esp. in import - When querying kickstart templates, do not return directories - Make triggers for add/delete work for renames and copies (same triggers) - Do not cache snippets so they can be tweaked w/o starting the service - Make manpage reference /etc/cobbler/settings, not /var/lib - Added manage_forward_zones/manage_reverse_zones to included config file There is a new source RPM for cobbler available at http://cobbler.et.redhat.com/download No update for koan is needed and this will all hit the mirrors eventually :) Thanks! --Michael _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools at redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools From mdehaan at redhat.com Tue Jun 3 20:54:09 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Tue, 03 Jun 2008 16:54:09 -0400 Subject: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) In-Reply-To: <26AA63832ED7774DBFB9FFB39B337C00243C68F4@nj0cech03.lnholdings.com> References: <4845AC13.7080400@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C68F4@nj0cech03.lnholdings.com> Message-ID: <4845AF71.8020709@redhat.com> Joseph Boyer Jr. wrote: > FYI: > > Just built cobbler 1.0.1 on RHEL 5.1 with all the latest updates and cobbler 1.0.1 errors on install FYI: cobbler 1.0.0-2 built and works..... > > # rpm -ivh /usr/src/redhat/RPMS/noarch/cobbler-1.0.1-1.noarch.rpm > Preparing... ########################################### [100%] > 1:cobbler ########################################### [100%] > Traceback (most recent call last): > File "/usr/bin/cobbler", line 17, in ? > import cobbler.cobbler as app > File "/usr/lib/python2.4/site-packages/cobbler/cobbler.py", line 18, in ? > import api > File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 17, in ? > import config > File "/usr/lib/python2.4/site-packages/cobbler/config.py", line 23, in ? > import collection_distros as distros > File "/usr/lib/python2.4/site-packages/cobbler/collection_distros.py", line 17, in ? > import collection > File "/usr/lib/python2.4/site-packages/cobbler/collection.py", line 129 > self.api.profiles().add(k, save=True, with_sync=with_sync, with_triggers=with_triggers,save=True) > SyntaxError: duplicate keyword argument > ny0ckss01:/var/www > # cobbler check > Traceback (most recent call last): > File "/usr/bin/cobbler", line 17, in ? > import cobbler.cobbler as app > File "/usr/lib/python2.4/site-packages/cobbler/cobbler.py", line 18, in ? > import api > File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 17, in ? > import config > File "/usr/lib/python2.4/site-packages/cobbler/config.py", line 23, in ? > import collection_distros as distros > File "/usr/lib/python2.4/site-packages/cobbler/collection_distros.py", line 17, in ? > import collection > File "/usr/lib/python2.4/site-packages/cobbler/collection.py", line 129 > self.api.profiles().add(k, save=True, with_sync=with_sync, with_triggers=with_triggers,save=True) > SyntaxError: duplicate keyword argument > > Joseph Boyer Jr > Enterprise Technology Services > Liquidnet Holdings, Inc. > Joseph.Boyer at liquidnet.com > T +1 646.660.8352 > C +1 646.284.8394 > > -----Original Message----- > From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Michael DeHaan > Sent: Tuesday, June 03, 2008 4:40 PM > To: 'et-mgmt-tools at redhat.com' > Subject: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) > > Since 1.0.1 was a big release, I decided to do a quick bugfix release to > close some of the items found in the first week by all of you on the lists. > There may be another bugfix release 1.0.2 depending on what gets > reported. Meanwhile work will continue on 1.1.X (devel branch) -- > items with easy workarounds that are in borderline bug/enhancement > territory will probably be fixed there instead. > > - Tue Jun 03 2008 - 1.0.1 > - Fix misformatted warning in "check" (with inherited profiles) > - Do not have RPM own tftpboot, just generate files in TFTP dir as detected > - Default arches to 'i386' not 'x86' for consistency, esp. in import > - When querying kickstart templates, do not return directories > - Make triggers for add/delete work for renames and copies (same triggers) > - Do not cache snippets so they can be tweaked w/o starting the service > - Make manpage reference /etc/cobbler/settings, not /var/lib > - Added manage_forward_zones/manage_reverse_zones to included config file > > There is a new source RPM for cobbler available at > > http://cobbler.et.redhat.com/download > > No update for koan is needed and this will all hit the mirrors eventually :) > > Thanks! > > --Michael > > > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > > > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > Something that is apparently legal in Python 2.5. Yikes. I'll rebuild it ASAP. --Michael From mdehaan at redhat.com Tue Jun 3 21:29:02 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Tue, 03 Jun 2008 17:29:02 -0400 Subject: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) In-Reply-To: <4845AF71.8020709@redhat.com> References: <4845AC13.7080400@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C68F4@nj0cech03.lnholdings.com> <4845AF71.8020709@redhat.com> Message-ID: <4845B79E.5050706@redhat.com> Michael DeHaan wrote: > Joseph Boyer Jr. wrote: >> FYI: >> >> Just built cobbler 1.0.1 on RHEL 5.1 with all the latest updates and >> cobbler 1.0.1 errors on install FYI: cobbler 1.0.0-2 built and >> works..... >> >> > > Something that is apparently legal in Python 2.5. Yikes. > > I'll rebuild it ASAP. > > --Michael Here's a fix for the duplicate argument problem: http://cobbler.et.redhat.com/download/cobbler-1.0.1-2.src.rpm Unit tests and basic commands work for me, let me know if you find anything else. --Michael From jboyer at liquidnet.com Tue Jun 3 21:30:38 2008 From: jboyer at liquidnet.com (Joseph Boyer Jr.) Date: Tue, 3 Jun 2008 17:30:38 -0400 Subject: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) In-Reply-To: <4845B79E.5050706@redhat.com> References: <4845AC13.7080400@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C68F4@nj0cech03.lnholdings.com> <4845AF71.8020709@redhat.com> <4845B79E.5050706@redhat.com> Message-ID: <26AA63832ED7774DBFB9FFB39B337C00243C694D@nj0cech03.lnholdings.com> GREAT! Thanks! I will build and test it now. Cheers, joe Joseph Boyer Jr Enterprise Technology Services Liquidnet Holdings, Inc. Joseph.Boyer at liquidnet.com T +1 646.660.8352 C +1 646.284.8394 -----Original Message----- From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Michael DeHaan Sent: Tuesday, June 03, 2008 5:29 PM To: Fedora/Linux Management Tools Subject: Re: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) Michael DeHaan wrote: > Joseph Boyer Jr. wrote: >> FYI: >> >> Just built cobbler 1.0.1 on RHEL 5.1 with all the latest updates and >> cobbler 1.0.1 errors on install FYI: cobbler 1.0.0-2 built and >> works..... >> >> > > Something that is apparently legal in Python 2.5. Yikes. > > I'll rebuild it ASAP. > > --Michael Here's a fix for the duplicate argument problem: http://cobbler.et.redhat.com/download/cobbler-1.0.1-2.src.rpm Unit tests and basic commands work for me, let me know if you find anything else. --Michael _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools at redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools From jboyer at liquidnet.com Tue Jun 3 22:23:56 2008 From: jboyer at liquidnet.com (Joseph Boyer Jr.) Date: Tue, 3 Jun 2008 18:23:56 -0400 Subject: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) In-Reply-To: <26AA63832ED7774DBFB9FFB39B337C00243C694D@nj0cech03.lnholdings.com> References: <4845AC13.7080400@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C68F4@nj0cech03.lnholdings.com> <4845AF71.8020709@redhat.com> <4845B79E.5050706@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C694D@nj0cech03.lnholdings.com> Message-ID: <26AA63832ED7774DBFB9FFB39B337C00243C69CD@nj0cech03.lnholdings.com> Looks good thanks again. However now back to my original issue.... I am having a problem with kickstart templates that are using snippets. If I have snippets in my ks template cobbler will not render the ks and hence the install fails. Here is the error from the web interface: Mod_python error: "PythonHandler services" Traceback (most recent call last): File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch result = object(req) File "/var/www/cobbler/svc/services.py", line 82, in handler content = func( **form ) File "/usr/lib/python2.4/site-packages/cobbler/services.py", line 70, in ks data = self.remote.generate_kickstart(profile,system,REMOTE_ADDR,REMOTE_MAC) File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__ return self.__send(self.__name, args) File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request verbose=self.__verbose File "/usr/lib64/python2.4/xmlrpclib.py", line 1147, in request return self._parse_response(h.getfile(), sock) File "/usr/lib64/python2.4/xmlrpclib.py", line 1286, in _parse_response return u.close() File "/usr/lib64/python2.4/xmlrpclib.py", line 744, in close raise Fault(**self._stack[0]) Fault: And here is the error from the HTTP server when anaconda trys to pull down the ks template from the server
Mod_python error: "PythonHandler services"

Traceback (most recent call last):

  File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch
    result = object(req)

  File "/var/www/cobbler/svc/services.py", line 82, in handler
    content = func( **form )

  File "/usr/lib/python2.4/site-packages/cobbler/services.py", line 70, in ks
    data = self.remote.generate_kickstart(profile,system,REMOTE_ADDR,REMOTE_MAC)

  File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
    return self.__send(self.__name, args)

  File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request
    verbose=self.__verbose

  File "/usr/lib64/python2.4/xmlrpclib.py", line 1147, in request
    return self._parse_response(h.getfile(), sock)

  File "/usr/lib64/python2.4/xmlrpclib.py", line 1281, in _parse_response
    p.feed(response)

  File "/usr/lib64/python2.4/xmlrpclib.py", line 527, in feed
    self._parser.Parse(data, 0)

ExpatError: not well-formed (invalid token): line 219, column 5

Let me know more info. I would be happy to show my snippets and ks templates. I have some cool stuff... At least I think so :-) PS. This all work find in 8.3 not so in 1.x Joseph Boyer Jr Enterprise Technology Services Liquidnet Holdings, Inc. Joseph.Boyer at liquidnet.com T +1 646.660.8352 C +1 646.284.8394 -----Original Message----- From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Joseph Boyer Jr. Sent: Tuesday, June 03, 2008 5:31 PM To: Fedora/Linux Management Tools Subject: RE: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) GREAT! Thanks! I will build and test it now. Cheers, joe Joseph Boyer Jr Enterprise Technology Services Liquidnet Holdings, Inc. Joseph.Boyer at liquidnet.com T +1 646.660.8352 C +1 646.284.8394 -----Original Message----- From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Michael DeHaan Sent: Tuesday, June 03, 2008 5:29 PM To: Fedora/Linux Management Tools Subject: Re: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) Michael DeHaan wrote: > Joseph Boyer Jr. wrote: >> FYI: >> >> Just built cobbler 1.0.1 on RHEL 5.1 with all the latest updates and >> cobbler 1.0.1 errors on install FYI: cobbler 1.0.0-2 built and >> works..... >> >> > > Something that is apparently legal in Python 2.5. Yikes. > > I'll rebuild it ASAP. > > --Michael Here's a fix for the duplicate argument problem: http://cobbler.et.redhat.com/download/cobbler-1.0.1-2.src.rpm Unit tests and basic commands work for me, let me know if you find anything else. --Michael _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools at redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools at redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools From jboyer at liquidnet.com Tue Jun 3 22:26:51 2008 From: jboyer at liquidnet.com (Joseph Boyer Jr.) Date: Tue, 3 Jun 2008 18:26:51 -0400 Subject: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) In-Reply-To: <26AA63832ED7774DBFB9FFB39B337C00243C69CD@nj0cech03.lnholdings.com> References: <4845AC13.7080400@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C68F4@nj0cech03.lnholdings.com> <4845AF71.8020709@redhat.com> <4845B79E.5050706@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C694D@nj0cech03.lnholdings.com> <26AA63832ED7774DBFB9FFB39B337C00243C69CD@nj0cech03.lnholdings.com> Message-ID: <26AA63832ED7774DBFB9FFB39B337C00243C69D0@nj0cech03.lnholdings.com> OH forgot to mention I suspect the issue to be that /var/lib/cobbler/snippets is not accessible by the http server. If I move the snippets directory some where accessible by apache than the ks template will be render but the none of the snippets are ran???? Joseph Boyer Jr Enterprise Technology Services Liquidnet Holdings, Inc. Joseph.Boyer at liquidnet.com T +1 646.660.8352 C +1 646.284.8394 -----Original Message----- From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Joseph Boyer Jr. Sent: Tuesday, June 03, 2008 6:24 PM To: Fedora/Linux Management Tools Subject: RE: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) Looks good thanks again. However now back to my original issue.... I am having a problem with kickstart templates that are using snippets. If I have snippets in my ks template cobbler will not render the ks and hence the install fails. Here is the error from the web interface: Mod_python error: "PythonHandler services" Traceback (most recent call last): File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch result = object(req) File "/var/www/cobbler/svc/services.py", line 82, in handler content = func( **form ) File "/usr/lib/python2.4/site-packages/cobbler/services.py", line 70, in ks data = self.remote.generate_kickstart(profile,system,REMOTE_ADDR,REMOTE_MAC) File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__ return self.__send(self.__name, args) File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request verbose=self.__verbose File "/usr/lib64/python2.4/xmlrpclib.py", line 1147, in request return self._parse_response(h.getfile(), sock) File "/usr/lib64/python2.4/xmlrpclib.py", line 1286, in _parse_response return u.close() File "/usr/lib64/python2.4/xmlrpclib.py", line 744, in close raise Fault(**self._stack[0]) Fault: And here is the error from the HTTP server when anaconda trys to pull down the ks template from the server
Mod_python error: "PythonHandler services"

Traceback (most recent call last):

  File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch
    result = object(req)

  File "/var/www/cobbler/svc/services.py", line 82, in handler
    content = func( **form )

  File "/usr/lib/python2.4/site-packages/cobbler/services.py", line 70, in ks
    data = self.remote.generate_kickstart(profile,system,REMOTE_ADDR,REMOTE_MAC)

  File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
    return self.__send(self.__name, args)

  File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request
    verbose=self.__verbose

  File "/usr/lib64/python2.4/xmlrpclib.py", line 1147, in request
    return self._parse_response(h.getfile(), sock)

  File "/usr/lib64/python2.4/xmlrpclib.py", line 1281, in _parse_response
    p.feed(response)

  File "/usr/lib64/python2.4/xmlrpclib.py", line 527, in feed
    self._parser.Parse(data, 0)

ExpatError: not well-formed (invalid token): line 219, column 5

Let me know more info. I would be happy to show my snippets and ks templates. I have some cool stuff... At least I think so :-) PS. This all work find in 8.3 not so in 1.x Joseph Boyer Jr Enterprise Technology Services Liquidnet Holdings, Inc. Joseph.Boyer at liquidnet.com T +1 646.660.8352 C +1 646.284.8394 -----Original Message----- From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Joseph Boyer Jr. Sent: Tuesday, June 03, 2008 5:31 PM To: Fedora/Linux Management Tools Subject: RE: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) GREAT! Thanks! I will build and test it now. Cheers, joe Joseph Boyer Jr Enterprise Technology Services Liquidnet Holdings, Inc. Joseph.Boyer at liquidnet.com T +1 646.660.8352 C +1 646.284.8394 -----Original Message----- From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Michael DeHaan Sent: Tuesday, June 03, 2008 5:29 PM To: Fedora/Linux Management Tools Subject: Re: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) Michael DeHaan wrote: > Joseph Boyer Jr. wrote: >> FYI: >> >> Just built cobbler 1.0.1 on RHEL 5.1 with all the latest updates and >> cobbler 1.0.1 errors on install FYI: cobbler 1.0.0-2 built and >> works..... >> >> > > Something that is apparently legal in Python 2.5. Yikes. > > I'll rebuild it ASAP. > > --Michael Here's a fix for the duplicate argument problem: http://cobbler.et.redhat.com/download/cobbler-1.0.1-2.src.rpm Unit tests and basic commands work for me, let me know if you find anything else. --Michael _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools at redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools at redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools at redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools From rjones at redhat.com Tue Jun 3 23:11:03 2008 From: rjones at redhat.com (Richard W.M. Jones) Date: Wed, 4 Jun 2008 00:11:03 +0100 Subject: [et-mgmt-tools] ANNOUNCE: virt-mem: tools for monitoring virtual machines Message-ID: <20080603231103.GA30478@amd.home.annexia.org> I'm pleased to announce this very early pre-alpha release of a further set of tools for monitoring virtual machines. The idea is to provide simple commands which can be run outside the virtual machine to monitor its status. These commands don't require you to log in to the virtual machine, or to install any software, since they work entirely by snooping. So they could be very useful for analyzing guests which are stuck / unresponsive / heavily loaded. Done so far: virt-uname like uname(1), print guest's system information virt-dmesg like dmesg(1), print guest's kernel messages Coming soon: virt-ps like ps(1), lists processes virt-free like free(1), lists free memory and swap If virt-ps works out, I might do a 'top'-like command, although of course I can't call it virt-top. I'm open to other suggestions too. Home page: http://et.redhat.com/~rjones/virt-mem/ Source: http://hg.et.redhat.com/virt/applications/virt-mem--devel ****NOTE**** These require a (forthcoming) patch to libvirt to snoop on virtual machines' memory. At the moment you can run them by using the QEMU memsave command to snapshot kernel memory to a file, and then run the program on the file. The snapshot process is described here: http://felinemenace.org/~andrewg/MikroTik_Router_Security_Analysis_Part2/ Support for Xen is still under investigation, but we believe it should be possible. Example: (qemu) memsave 3222274048 15728640 snap.mem $ virt-uname -A i386 -T i386 -t ~/snap.mem /home/rjones/snap.mem: Linux localhost.localdomain 2.6.24-0.155.rc7.git6.fc9 #1 SMP Tue Jan 15 17:52:31 EST 2008 i686 (none) Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v From sakaia at jp.fujitsu.com Wed Jun 4 08:21:58 2008 From: sakaia at jp.fujitsu.com (Atsushi SAKAI) Date: Wed, 04 Jun 2008 17:21:58 +0900 Subject: [et-mgmt-tools] [virtmgr] Question about the plan for support provisioning Message-ID: <200806040821.m548LxRU020370@fjmscan503.ms.jp.fujitsu.com> Hi, I have a question about provisioning support for virt-manager. If any planned for this, please explain the plan. If provisioning is plannned to suppport complicated functions, it takes long time to support. Or simple provisioning support is planned. I guess virt-install implements to support remote connection, since libvirt uses remote interface. This makes smaller changes to virtmanager. And also, remote storage API is already supported on libvirt. It seems to support provisiong in near future. Thanks Atsushi SAKAI From crobinso at redhat.com Wed Jun 4 13:11:58 2008 From: crobinso at redhat.com (Cole Robinson) Date: Wed, 04 Jun 2008 09:11:58 -0400 Subject: [et-mgmt-tools] [virtmgr] Question about the plan for support provisioning In-Reply-To: <200806040821.m548LxRU020370@fjmscan503.ms.jp.fujitsu.com> References: <200806040821.m548LxRU020370@fjmscan503.ms.jp.fujitsu.com> Message-ID: <4846949E.7090101@redhat.com> Atsushi SAKAI wrote: > Hi, > > I have a question about provisioning support for virt-manager. > > If any planned for this, please explain the plan. > If provisioning is plannned to suppport complicated functions, > it takes long time to support. > Or simple provisioning support is planned. > > I guess virt-install implements to support remote connection, > since libvirt uses remote interface. > This makes smaller changes to virtmanager. > > And also, remote storage API is already supported on libvirt. > It seems to support provisiong in near future. > Remote guest creation is on the way for virt-manager, I've actually just started working on some of the internals for handling the libvirt storage APIs. Some sort of UI for virt-clone is also on the roadmap though no work has been done on it. - Cole From mdehaan at redhat.com Wed Jun 4 13:45:12 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Wed, 04 Jun 2008 09:45:12 -0400 Subject: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) In-Reply-To: <26AA63832ED7774DBFB9FFB39B337C00243C69D0@nj0cech03.lnholdings.com> References: <4845AC13.7080400@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C68F4@nj0cech03.lnholdings.com> <4845AF71.8020709@redhat.com> <4845B79E.5050706@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C694D@nj0cech03.lnholdings.com> <26AA63832ED7774DBFB9FFB39B337C00243C69CD@nj0cech03.lnholdings.com> <26AA63832ED7774DBFB9FFB39B337C00243C69D0@nj0cech03.lnholdings.com> Message-ID: <48469C68.4030902@redhat.com> Joseph Boyer Jr. wrote: > OH forgot to mention I suspect the issue to be that /var/lib/cobbler/snippets is not accessible by the http server. If I move the snippets directory some where accessible by apache than the ks template will be render but the none of the snippets are ran???? > That's not the problem as cobblerd reads that directory, not Apache. Removing it will obviously keep it from being found. What you likely have is a Cheetah syntax error, which I'm not sure why you didn't have before, but that's likely it. You should be able to find more information in /var/log/cobbler/cobbler.log. Paste the last few tracebacks and we'll see what's up. --Michael > > > -----Original Message----- > From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Joseph Boyer Jr. > Sent: Tuesday, June 03, 2008 6:24 PM > To: Fedora/Linux Management Tools > Subject: RE: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) > > Looks good thanks again. > > However now back to my original issue.... > > I am having a problem with kickstart templates that are using snippets. If I have snippets in my ks template cobbler will not render the ks and hence the install fails. > > Here is the error from the web interface: > Mod_python error: "PythonHandler services" > > Traceback (most recent call last): > > File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch > result = object(req) > > File "/var/www/cobbler/svc/services.py", line 82, in handler > content = func( **form ) > > File "/usr/lib/python2.4/site-packages/cobbler/services.py", line 70, in ks > data = self.remote.generate_kickstart(profile,system,REMOTE_ADDR,REMOTE_MAC) > > File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__ > return self.__send(self.__name, args) > > File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request > verbose=self.__verbose > > File "/usr/lib64/python2.4/xmlrpclib.py", line 1147, in request > return self._parse_response(h.getfile(), sock) > > File "/usr/lib64/python2.4/xmlrpclib.py", line 1286, in _parse_response > return u.close() > > File "/usr/lib64/python2.4/xmlrpclib.py", line 744, in close > raise Fault(**self._stack[0]) > > Fault: > > > And here is the error from the HTTP server when anaconda trys to pull down the ks template from the server > >
> Mod_python error: "PythonHandler services"
>
> Traceback (most recent call last):
>
>   File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch
>     result = object(req)
>
>   File "/var/www/cobbler/svc/services.py", line 82, in handler
>     content = func( **form )
>
>   File "/usr/lib/python2.4/site-packages/cobbler/services.py", line 70, in ks
>     data = self.remote.generate_kickstart(profile,system,REMOTE_ADDR,REMOTE_MAC)
>
>   File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
>     return self.__send(self.__name, args)
>
>   File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request
>     verbose=self.__verbose
>
>   File "/usr/lib64/python2.4/xmlrpclib.py", line 1147, in request
>     return self._parse_response(h.getfile(), sock)
>
>   File "/usr/lib64/python2.4/xmlrpclib.py", line 1281, in _parse_response
>     p.feed(response)
>
>   File "/usr/lib64/python2.4/xmlrpclib.py", line 527, in feed
>     self._parser.Parse(data, 0)
>
> ExpatError: not well-formed (invalid token): line 219, column 5
>
> 
> > Let me know more info. I would be happy to show my snippets and ks templates. I have some cool stuff... > From jboyer at liquidnet.com Wed Jun 4 14:32:30 2008 From: jboyer at liquidnet.com (Joseph Boyer Jr.) Date: Wed, 4 Jun 2008 10:32:30 -0400 Subject: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) In-Reply-To: <48469C68.4030902@redhat.com> References: <4845AC13.7080400@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C68F4@nj0cech03.lnholdings.com> <4845AF71.8020709@redhat.com> <4845B79E.5050706@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C694D@nj0cech03.lnholdings.com> <26AA63832ED7774DBFB9FFB39B337C00243C69CD@nj0cech03.lnholdings.com> <26AA63832ED7774DBFB9FFB39B337C00243C69D0@nj0cech03.lnholdings.com> <48469C68.4030902@redhat.com> Message-ID: <26AA63832ED7774DBFB9FFB39B337C00243C6D05@nj0cech03.lnholdings.com> Hi Mike... Here are the trace backs from wget http://10.0.254.169/cblr/svc/op/ks/system/ny0dlab01, and /var/log/cobbler/cobbler.log Wget ks template...
Mod_python error: "PythonHandler services"

Traceback (most recent call last):

  File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch
    result = object(req)

  File "/var/www/cobbler/svc/services.py", line 82, in handler
    content = func( **form )

  File "/usr/lib/python2.4/site-packages/cobbler/services.py", line 70, in ks
    data = self.remote.generate_kickstart(profile,system,REMOTE_ADDR,REMOTE_MAC)

  File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
    return self.__send(self.__name, args)

  File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request
    verbose=self.__verbose

  File "/usr/lib64/python2.4/xmlrpclib.py", line 1147, in request
    return self._parse_response(h.getfile(), sock)

  File "/usr/lib64/python2.4/xmlrpclib.py", line 1281, in _parse_response
    p.feed(response)

  File "/usr/lib64/python2.4/xmlrpclib.py", line 527, in feed
    self._parser.Parse(data, 0)

ExpatError: not well-formed (invalid token): line 219, column 5

Cobbler.log 2008-06-04 10:24:16,738 - remote - login succeeded; user(jboyer at LNHOLDINGS.COM) 2008-06-04 10:24:16,815 - remote - get_profiles; user(?) 2008-06-04 10:24:18,633 - remote - generate_kickstart; user(?) 2008-06-04 10:24:18,634 - api - generate_kickstart 2008-06-04 10:24:18,817 - api - Exception occured: exceptions.NameError 2008-06-04 10:24:18,817 - api - Exception value: global name '_' is not defined 2008-06-04 10:24:18,822 - api - Exception Info: File "/usr/lib/python2.4/site-packages/cobbler/kickgen.py", line 80, in generate_kickstart_for_profile data = self.templar.render(kfile, meta, None, g) File "/usr/lib/python2.4/site-packages/cobbler/templar.py", line 88, in render print _("There appears to be an formatting error in the template file.") thanks, joe Joseph Boyer Jr Enterprise Technology Services Liquidnet Holdings, Inc. Joseph.Boyer at liquidnet.com T +1 646.660.8352 C +1 646.284.8394 -----Original Message----- From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Michael DeHaan Sent: Wednesday, June 04, 2008 9:45 AM To: Fedora/Linux Management Tools Subject: Re: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) Joseph Boyer Jr. wrote: > OH forgot to mention I suspect the issue to be that /var/lib/cobbler/snippets is not accessible by the http server. If I move the snippets directory some where accessible by apache than the ks template will be render but the none of the snippets are ran???? > That's not the problem as cobblerd reads that directory, not Apache. Removing it will obviously keep it from being found. What you likely have is a Cheetah syntax error, which I'm not sure why you didn't have before, but that's likely it. You should be able to find more information in /var/log/cobbler/cobbler.log. Paste the last few tracebacks and we'll see what's up. --Michael > > > -----Original Message----- > From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Joseph Boyer Jr. > Sent: Tuesday, June 03, 2008 6:24 PM > To: Fedora/Linux Management Tools > Subject: RE: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) > > Looks good thanks again. > > However now back to my original issue.... > > I am having a problem with kickstart templates that are using snippets. If I have snippets in my ks template cobbler will not render the ks and hence the install fails. > > Here is the error from the web interface: > Mod_python error: "PythonHandler services" > > Traceback (most recent call last): > > File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch > result = object(req) > > File "/var/www/cobbler/svc/services.py", line 82, in handler > content = func( **form ) > > File "/usr/lib/python2.4/site-packages/cobbler/services.py", line 70, in ks > data = self.remote.generate_kickstart(profile,system,REMOTE_ADDR,REMOTE_MAC) > > File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__ > return self.__send(self.__name, args) > > File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request > verbose=self.__verbose > > File "/usr/lib64/python2.4/xmlrpclib.py", line 1147, in request > return self._parse_response(h.getfile(), sock) > > File "/usr/lib64/python2.4/xmlrpclib.py", line 1286, in _parse_response > return u.close() > > File "/usr/lib64/python2.4/xmlrpclib.py", line 744, in close > raise Fault(**self._stack[0]) > > Fault: > > > And here is the error from the HTTP server when anaconda trys to pull down the ks template from the server > >
> Mod_python error: "PythonHandler services"
>
> Traceback (most recent call last):
>
>   File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch
>     result = object(req)
>
>   File "/var/www/cobbler/svc/services.py", line 82, in handler
>     content = func( **form )
>
>   File "/usr/lib/python2.4/site-packages/cobbler/services.py", line 70, in ks
>     data = self.remote.generate_kickstart(profile,system,REMOTE_ADDR,REMOTE_MAC)
>
>   File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
>     return self.__send(self.__name, args)
>
>   File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request
>     verbose=self.__verbose
>
>   File "/usr/lib64/python2.4/xmlrpclib.py", line 1147, in request
>     return self._parse_response(h.getfile(), sock)
>
>   File "/usr/lib64/python2.4/xmlrpclib.py", line 1281, in _parse_response
>     p.feed(response)
>
>   File "/usr/lib64/python2.4/xmlrpclib.py", line 527, in feed
>     self._parser.Parse(data, 0)
>
> ExpatError: not well-formed (invalid token): line 219, column 5
>
> 
> > Let me know more info. I would be happy to show my snippets and ks templates. I have some cool stuff... > _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools at redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools From mdehaan at redhat.com Wed Jun 4 15:00:31 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Wed, 04 Jun 2008 11:00:31 -0400 Subject: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) In-Reply-To: <26AA63832ED7774DBFB9FFB39B337C00243C6D05@nj0cech03.lnholdings.com> References: <4845AC13.7080400@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C68F4@nj0cech03.lnholdings.com> <4845AF71.8020709@redhat.com> <4845B79E.5050706@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C694D@nj0cech03.lnholdings.com> <26AA63832ED7774DBFB9FFB39B337C00243C69CD@nj0cech03.lnholdings.com> <26AA63832ED7774DBFB9FFB39B337C00243C69D0@nj0cech03.lnholdings.com> <48469C68.4030902@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C6D05@nj0cech03.lnholdings.com> Message-ID: <4846AE0F.9080103@redhat.com> Joseph Boyer Jr. wrote: > Hi Mike... > > Here are the trace backs from wget http://10.0.254.169/cblr/svc/op/ks/system/ny0dlab01, and /var/log/cobbler/cobbler.log > > Wget ks template... > > ExpatError: not well-formed (invalid token): line 219, column 5 > > > > Cobbler.log > > 2008-06-04 10:24:16,738 - remote - login succeeded; user(jboyer at LNHOLDINGS.COM) > 2008-06-04 10:24:16,815 - remote - get_profiles; user(?) > 2008-06-04 10:24:18,633 - remote - generate_kickstart; user(?) > 2008-06-04 10:24:18,634 - api - generate_kickstart > 2008-06-04 10:24:18,817 - api - Exception occured: exceptions.NameError > 2008-06-04 10:24:18,817 - api - Exception value: global name '_' is not defined > 2008-06-04 10:24:18,822 - api - Exception Info: > File "/usr/lib/python2.4/site-packages/cobbler/kickgen.py", line 80, in generate_kickstart_for_profile > data = self.templar.render(kfile, meta, None, g) > File "/usr/lib/python2.4/site-packages/cobbler/templar.py", line 88, in render > print _("There appears to be an formatting error in the template file.") > > Can you email me your template file? (http://cobbler.pastebin.com works pretty well for this... perhaps you want to join #cobbler on irc.freenode.net and share it) It appears that there is something wrong about a "_", and around 219, but without looking at the file it's hard to say. --Michael From mdehaan at redhat.com Wed Jun 4 15:11:16 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Wed, 04 Jun 2008 11:11:16 -0400 Subject: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) In-Reply-To: <4846AE0F.9080103@redhat.com> References: <4845AC13.7080400@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C68F4@nj0cech03.lnholdings.com> <4845AF71.8020709@redhat.com> <4845B79E.5050706@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C694D@nj0cech03.lnholdings.com> <26AA63832ED7774DBFB9FFB39B337C00243C69CD@nj0cech03.lnholdings.com> <26AA63832ED7774DBFB9FFB39B337C00243C69D0@nj0cech03.lnholdings.com> <48469C68.4030902@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C6D05@nj0cech03.lnholdings.com> <4846AE0F.9080103@redhat.com> Message-ID: <4846B094.9020307@redhat.com> Michael DeHaan wrote: > Joseph Boyer Jr. wrote: >> Hi Mike... >> >> Here are the trace backs from wget >> http://10.0.254.169/cblr/svc/op/ks/system/ny0dlab01, and >> /var/log/cobbler/cobbler.log >> >> Wget ks template... >> >> ExpatError: not well-formed (invalid token): line 219, column 5 >> >> >> >> Cobbler.log >> >> 2008-06-04 10:24:16,738 - remote - login succeeded; >> user(jboyer at LNHOLDINGS.COM) >> 2008-06-04 10:24:16,815 - remote - get_profiles; user(?) >> 2008-06-04 10:24:18,633 - remote - generate_kickstart; user(?) >> 2008-06-04 10:24:18,634 - api - generate_kickstart >> 2008-06-04 10:24:18,817 - api - Exception occured: exceptions.NameError >> 2008-06-04 10:24:18,817 - api - Exception value: global name '_' is >> not defined >> 2008-06-04 10:24:18,822 - api - Exception Info: >> File "/usr/lib/python2.4/site-packages/cobbler/kickgen.py", line >> 80, in generate_kickstart_for_profile >> data = self.templar.render(kfile, meta, None, g) >> File "/usr/lib/python2.4/site-packages/cobbler/templar.py", line >> 88, in render >> print _("There appears to be an formatting error in the template >> file.") >> >> > > Can you email me your template file? (http://cobbler.pastebin.com > works pretty well for this... perhaps you want to join #cobbler on > irc.freenode.net and share it) > > It appears that there is something wrong about a "_", and around 219, > but without looking at the file it's hard to say. > > --Michael > Actually the bit about "_" is an error while trying to give you the error message. This will fix your logging so you can see the rest of the Cheetah error in /var/log/cobbler/cobbler.log: --- a/cobbler/templar.py +++ b/cobbler/templar.py @@ -17,9 +17,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. import os import os.path import glob -import utils from cexceptions import * from Cheetah.Template import Template +from utils import * +import utils class Templar: I have already applied that fix to the logging messages, though the error should be a syntax one you still need to fix, after reading the logs to figure out what it is. > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From tom at ng23.net Wed Jun 4 16:04:07 2008 From: tom at ng23.net (Tom Brown) Date: Wed, 04 Jun 2008 17:04:07 +0100 Subject: [et-mgmt-tools] Upgrade to 1.0 - slight issue Message-ID: <4846BCF7.1090303@ng23.net> Hi During the cobbler check after the upgrade i get this The following potential problems were detected: #0: One or more kickstart templates references default password 'cobbler' and should be changed for security reasons: /etc/cobbler/legacy.ks, /etc/cobbler/sample_end.ks, /etc/cobbler/sample.ks However 'cobbler' is not in any of those files - i dont actually need them but does anyone know why this is? thanks From jboyer at liquidnet.com Wed Jun 4 16:22:29 2008 From: jboyer at liquidnet.com (Joseph Boyer Jr.) Date: Wed, 4 Jun 2008 12:22:29 -0400 Subject: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) In-Reply-To: <4846B094.9020307@redhat.com> References: <4845AC13.7080400@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C68F4@nj0cech03.lnholdings.com> <4845AF71.8020709@redhat.com> <4845B79E.5050706@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C694D@nj0cech03.lnholdings.com> <26AA63832ED7774DBFB9FFB39B337C00243C69CD@nj0cech03.lnholdings.com> <26AA63832ED7774DBFB9FFB39B337C00243C69D0@nj0cech03.lnholdings.com> <48469C68.4030902@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C6D05@nj0cech03.lnholdings.com> <4846AE0F.9080103@redhat.com> <4846B094.9020307@redhat.com> Message-ID: <26AA63832ED7774DBFB9FFB39B337C00243C6E66@nj0cech03.lnholdings.com> Hi Mike... I have posted my tmpl file to http://cobbler.pastebin.com and here they are as well. I have also included my snippets in this email. Thanks for the help! Cheers, joe Joseph Boyer Jr Enterprise Technology Services Liquidnet Holdings, Inc. Joseph.Boyer at liquidnet.com T +1 646.660.8352 C +1 646.284.8394 -----Original Message----- From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Michael DeHaan Sent: Wednesday, June 04, 2008 11:11 AM To: Fedora/Linux Management Tools Subject: Re: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) Michael DeHaan wrote: > Joseph Boyer Jr. wrote: >> Hi Mike... >> >> Here are the trace backs from wget >> http://10.0.254.169/cblr/svc/op/ks/system/ny0dlab01, and >> /var/log/cobbler/cobbler.log >> >> Wget ks template... >> >> ExpatError: not well-formed (invalid token): line 219, column 5 >> >> >> >> Cobbler.log >> >> 2008-06-04 10:24:16,738 - remote - login succeeded; >> user(jboyer at LNHOLDINGS.COM) >> 2008-06-04 10:24:16,815 - remote - get_profiles; user(?) >> 2008-06-04 10:24:18,633 - remote - generate_kickstart; user(?) >> 2008-06-04 10:24:18,634 - api - generate_kickstart >> 2008-06-04 10:24:18,817 - api - Exception occured: exceptions.NameError >> 2008-06-04 10:24:18,817 - api - Exception value: global name '_' is >> not defined >> 2008-06-04 10:24:18,822 - api - Exception Info: >> File "/usr/lib/python2.4/site-packages/cobbler/kickgen.py", line >> 80, in generate_kickstart_for_profile >> data = self.templar.render(kfile, meta, None, g) >> File "/usr/lib/python2.4/site-packages/cobbler/templar.py", line >> 88, in render >> print _("There appears to be an formatting error in the template >> file.") >> >> > > Can you email me your template file? (http://cobbler.pastebin.com > works pretty well for this... perhaps you want to join #cobbler on > irc.freenode.net and share it) > > It appears that there is something wrong about a "_", and around 219, > but without looking at the file it's hard to say. > > --Michael > Actually the bit about "_" is an error while trying to give you the error message. This will fix your logging so you can see the rest of the Cheetah error in /var/log/cobbler/cobbler.log: --- a/cobbler/templar.py +++ b/cobbler/templar.py @@ -17,9 +17,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. import os import os.path import glob -import utils from cexceptions import * from Cheetah.Template import Template +from utils import * +import utils class Templar: I have already applied that fix to the logging messages, though the error should be a syntax one you still need to fix, after reading the logs to figure out what it is. > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools at redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools -------------- next part -------------- A non-text attachment was scrubbed... Name: ks.tmpl Type: application/octet-stream Size: 1112 bytes Desc: ks.tmpl URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ks.rendered Type: application/octet-stream Size: 6764 bytes Desc: ks.rendered URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rpmLIST Type: application/octet-stream Size: 539 bytes Desc: rpmLIST URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: networkIT Type: application/octet-stream Size: 773 bytes Desc: networkIT URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: partitionIT Type: application/octet-stream Size: 3666 bytes Desc: partitionIT URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: postINSTALL Type: application/octet-stream Size: 1707 bytes Desc: postINSTALL URL: From jboyer at liquidnet.com Wed Jun 4 16:26:55 2008 From: jboyer at liquidnet.com (Joseph Boyer Jr.) Date: Wed, 4 Jun 2008 12:26:55 -0400 Subject: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) In-Reply-To: <26AA63832ED7774DBFB9FFB39B337C00243C6E66@nj0cech03.lnholdings.com> References: <4845AC13.7080400@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C68F4@nj0cech03.lnholdings.com> <4845AF71.8020709@redhat.com> <4845B79E.5050706@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C694D@nj0cech03.lnholdings.com> <26AA63832ED7774DBFB9FFB39B337C00243C69CD@nj0cech03.lnholdings.com> <26AA63832ED7774DBFB9FFB39B337C00243C69D0@nj0cech03.lnholdings.com> <48469C68.4030902@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C6D05@nj0cech03.lnholdings.com> <4846AE0F.9080103@redhat.com> <4846B094.9020307@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C6E66@nj0cech03.lnholdings.com> Message-ID: <26AA63832ED7774DBFB9FFB39B337C00243C6E72@nj0cech03.lnholdings.com> Forgot to mention that it is the rpmLIST snippet that is breaking things, it did work well in .8.3 all others seem to work Joseph Boyer Jr Enterprise Technology Services Liquidnet Holdings, Inc. Joseph.Boyer at liquidnet.com T +1 646.660.8352 C +1 646.284.8394 -----Original Message----- From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Joseph Boyer Jr. Sent: Wednesday, June 04, 2008 12:22 PM To: Fedora/Linux Management Tools Subject: RE: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) Hi Mike... I have posted my tmpl file to http://cobbler.pastebin.com and here they are as well. I have also included my snippets in this email. Thanks for the help! Cheers, joe Joseph Boyer Jr Enterprise Technology Services Liquidnet Holdings, Inc. Joseph.Boyer at liquidnet.com T +1 646.660.8352 C +1 646.284.8394 -----Original Message----- From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Michael DeHaan Sent: Wednesday, June 04, 2008 11:11 AM To: Fedora/Linux Management Tools Subject: Re: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) Michael DeHaan wrote: > Joseph Boyer Jr. wrote: >> Hi Mike... >> >> Here are the trace backs from wget >> http://10.0.254.169/cblr/svc/op/ks/system/ny0dlab01, and >> /var/log/cobbler/cobbler.log >> >> Wget ks template... >> >> ExpatError: not well-formed (invalid token): line 219, column 5 >> >> >> >> Cobbler.log >> >> 2008-06-04 10:24:16,738 - remote - login succeeded; >> user(jboyer at LNHOLDINGS.COM) >> 2008-06-04 10:24:16,815 - remote - get_profiles; user(?) >> 2008-06-04 10:24:18,633 - remote - generate_kickstart; user(?) >> 2008-06-04 10:24:18,634 - api - generate_kickstart >> 2008-06-04 10:24:18,817 - api - Exception occured: >> exceptions.NameError >> 2008-06-04 10:24:18,817 - api - Exception value: global name '_' is >> not defined >> 2008-06-04 10:24:18,822 - api - Exception Info: >> File "/usr/lib/python2.4/site-packages/cobbler/kickgen.py", line >> 80, in generate_kickstart_for_profile >> data = self.templar.render(kfile, meta, None, g) >> File "/usr/lib/python2.4/site-packages/cobbler/templar.py", line >> 88, in render >> print _("There appears to be an formatting error in the template >> file.") >> >> > > Can you email me your template file? (http://cobbler.pastebin.com > works pretty well for this... perhaps you want to join #cobbler on > irc.freenode.net and share it) > > It appears that there is something wrong about a "_", and around 219, > but without looking at the file it's hard to say. > > --Michael > Actually the bit about "_" is an error while trying to give you the error message. This will fix your logging so you can see the rest of the Cheetah error in /var/log/cobbler/cobbler.log: --- a/cobbler/templar.py +++ b/cobbler/templar.py @@ -17,9 +17,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. import os import os.path import glob -import utils from cexceptions import * from Cheetah.Template import Template +from utils import * +import utils class Templar: I have already applied that fix to the logging messages, though the error should be a syntax one you still need to fix, after reading the logs to figure out what it is. > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools at redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools From dmourati at gmail.com Wed Jun 4 17:18:38 2008 From: dmourati at gmail.com (Demetri Mouratis) Date: Wed, 4 Jun 2008 10:18:38 -0700 Subject: [et-mgmt-tools] Cobbler server is downlevel Message-ID: <3cc2cbc40806041018hed4e29eu1b3917bbe955aa4b@mail.gmail.com> Hi, I'm having an issue with cobbler/koan and version numbers across CentOS 4/5. I'm attempting to use koan-1.0.0-1.el5 to install a xen virtualized guest of CentOS 4. The dom0 in question is CentOS 5. The cobbler server is running CentOS 4 and cobbler-0.8.3-3.el4. Both cobbler and koan are installed out of EPEL from their respective repositories. I get the following message invoking koan on CentOS5: # koan --virt --profile=centos4virt --server=lncbuild.lnc.rnmd.net --nogfx cobbler server is downlevel, need version >= 0.9, have 0.803 Cobbler on CentOS 4 is the latest at cobbler-0.8.3-3.el4. # yum -y update cobbler Setting up Update Process Setting up repositories Reading repository metadata in from local files Could not find update match for cobbler No Packages marked for Update/Obsoletion Should I downgrade koan? Rebuild a newer cobbler from source? Why the version mismatch? Thanks. -D From mdehaan at redhat.com Wed Jun 4 17:39:53 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Wed, 04 Jun 2008 13:39:53 -0400 Subject: [et-mgmt-tools] Cobbler server is downlevel In-Reply-To: <3cc2cbc40806041018hed4e29eu1b3917bbe955aa4b@mail.gmail.com> References: <3cc2cbc40806041018hed4e29eu1b3917bbe955aa4b@mail.gmail.com> Message-ID: <4846D369.70007@redhat.com> Demetri Mouratis wrote: > Hi, > > I'm having an issue with cobbler/koan and version numbers across > CentOS 4/5. I'm attempting to use koan-1.0.0-1.el5 to install a xen > virtualized guest of CentOS 4. The dom0 in question is CentOS 5. The > cobbler server is running CentOS 4 and cobbler-0.8.3-3.el4. > > This updated koan wants Cobbler 1.0. > Both cobbler and koan are installed out of EPEL from their respective > repositories. > > Looks like 1.0 to me. http://download.fedora.redhat.com/pub/epel/5/i386/repoview/cobbler.html From mdehaan at redhat.com Wed Jun 4 17:43:39 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Wed, 04 Jun 2008 13:43:39 -0400 Subject: [et-mgmt-tools] Upgrade to 1.0 - slight issue In-Reply-To: <4846BCF7.1090303@ng23.net> References: <4846BCF7.1090303@ng23.net> Message-ID: <4846D44B.9020008@redhat.com> Tom Brown wrote: > Hi > > During the cobbler check after the upgrade i get this > > The following potential problems were detected: > #0: One or more kickstart templates references default password > 'cobbler' and should be changed for security reasons: > /etc/cobbler/legacy.ks, /etc/cobbler/sample_end.ks, > /etc/cobbler/sample.ks > > However 'cobbler' is not in any of those files - i dont actually need > them but does anyone know why this is? No it's not, but a hashed version of that is. If you're not using any of those templates, then feel free to disregard, but it's a safer bet to change them when you get a chance just in case someone decides to use them later. This message was added for 1.0, previously it did not remind you to change them. --Michael > > thanks > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From dmourati at gmail.com Wed Jun 4 17:44:53 2008 From: dmourati at gmail.com (Demetri Mouratis) Date: Wed, 4 Jun 2008 10:44:53 -0700 Subject: [et-mgmt-tools] Cobbler server is downlevel In-Reply-To: <4846D369.70007@redhat.com> References: <3cc2cbc40806041018hed4e29eu1b3917bbe955aa4b@mail.gmail.com> <4846D369.70007@redhat.com> Message-ID: <3cc2cbc40806041044j340beb3et82e902fd4593d51d@mail.gmail.com> On Wed, Jun 4, 2008 at 10:39 AM, Michael DeHaan wrote: > Demetri Mouratis wrote: > Looks like 1.0 to me. > > http://download.fedora.redhat.com/pub/epel/5/i386/repoview/cobbler.html That's for 5. I'm on 4: http://download.fedora.redhat.com/pub/epel/4/i386/repoview/cobbler.html From mdehaan at redhat.com Wed Jun 4 18:49:41 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Wed, 04 Jun 2008 14:49:41 -0400 Subject: [et-mgmt-tools] Cobbler server is downlevel In-Reply-To: <3cc2cbc40806041044j340beb3et82e902fd4593d51d@mail.gmail.com> References: <3cc2cbc40806041018hed4e29eu1b3917bbe955aa4b@mail.gmail.com> <4846D369.70007@redhat.com> <3cc2cbc40806041044j340beb3et82e902fd4593d51d@mail.gmail.com> Message-ID: <4846E3C5.1060701@redhat.com> Demetri Mouratis wrote: > That's for 5. I'm on 4: > > http://download.fedora.redhat.com/pub/epel/4/i386/repoview/cobbler.html > > You can use EPEL testing if you like, as this is what the download page indicates you should do to always make sure you get the latest promptly. From #epel on irc.freenode.net: mpdehaan, testing -> stable moves for EPEL 5 are done at the beginning of each month; moves for EPEL4 are done at the middle of the months (around hte 15th) Hope that helps! --Michael From dmourati at gmail.com Wed Jun 4 19:34:58 2008 From: dmourati at gmail.com (Demetri Mouratis) Date: Wed, 4 Jun 2008 12:34:58 -0700 Subject: [et-mgmt-tools] Cobbler server is downlevel In-Reply-To: <4846E3C5.1060701@redhat.com> References: <3cc2cbc40806041018hed4e29eu1b3917bbe955aa4b@mail.gmail.com> <4846D369.70007@redhat.com> <3cc2cbc40806041044j340beb3et82e902fd4593d51d@mail.gmail.com> <4846E3C5.1060701@redhat.com> Message-ID: <3cc2cbc40806041234k3b2e1a93l71bbe9db0b8b59c0@mail.gmail.com> On Wed, Jun 4, 2008 at 11:49 AM, Michael DeHaan wrote: > You can use EPEL testing if you like, as this is what the download page > indicates you should do to always make sure you get the latest promptly. > > From #epel on irc.freenode.net: > > mpdehaan, testing -> stable moves for EPEL 5 are done at the > beginning of each month; moves for EPEL4 are done at the middle of the > months (around hte 15th) > > Hope that helps! Thanks! From jeckersb at redhat.com Wed Jun 4 20:23:30 2008 From: jeckersb at redhat.com (John Eckersberg) Date: Wed, 04 Jun 2008 16:23:30 -0400 Subject: [et-mgmt-tools] virt error with F9 and KVM Message-ID: <4846F9C2.4020004@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Output is attached. I have no idea what 'hvm' is and why it is getting attached to the path. I don't have anything like that in my install tree. - -- John Eckersberg Production Operations Red Hat, Inc. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkhG+cIACgkQO5VSO/Qqm+i3VwCeMrzXImvRnwlF3RcGoluAlP+6 s4YAoJ8aa1sUxXDRKuxqfHk2HpLTu7qb =VCcb -----END PGP SIGNATURE----- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: error.txt URL: From mdehaan at redhat.com Wed Jun 4 20:26:13 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Wed, 04 Jun 2008 16:26:13 -0400 Subject: [et-mgmt-tools] virt error with F9 and KVM In-Reply-To: <4846F9C2.4020004@redhat.com> References: <4846F9C2.4020004@redhat.com> Message-ID: <4846FA65.6000203@redhat.com> John Eckersberg wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Output is attached. I have no idea what 'hvm' is and why it is getting > attached to the path. I don't have anything like that in my install > tree. Right... I'm not sure why this URL is being requested for a RHEL5 tree. Can one of the virtinst guys shed some light on this? The correct URL for it to be requesting should not be http://puppet.intdev.redhat.com/cblr/links/RHEL-5-Server-U1-i386//images/hvm/vmlinuz but the one without the 'hvm'. --Michael > > - -- > John Eckersberg > Production Operations > Red Hat, Inc. > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org > > iEYEARECAAYFAkhG+cIACgkQO5VSO/Qqm+i3VwCeMrzXImvRnwlF3RcGoluAlP+6 > s4YAoJ8aa1sUxXDRKuxqfHk2HpLTu7qb > =VCcb > -----END PGP SIGNATURE----- > ------------------------------------------------------------------------ > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From berrange at redhat.com Wed Jun 4 20:27:04 2008 From: berrange at redhat.com (Daniel P. Berrange) Date: Wed, 4 Jun 2008 21:27:04 +0100 Subject: [et-mgmt-tools] virt error with F9 and KVM In-Reply-To: <4846F9C2.4020004@redhat.com> References: <4846F9C2.4020004@redhat.com> Message-ID: <20080604202704.GD19449@redhat.com> On Wed, Jun 04, 2008 at 04:23:30PM -0400, John Eckersberg wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Output is attached. I have no idea what 'hvm' is and why it is getting > attached to the path. I don't have anything like that in my install tree. This is a bug fixed upstream http://hg.et.redhat.com/virt/applications/virtinst--devel?cs=5f10c7c171af Can you file a BZ against it and we'll get it pushed to Fedora updates Dan. -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From jeckersb at redhat.com Wed Jun 4 20:47:21 2008 From: jeckersb at redhat.com (John Eckersberg) Date: Wed, 04 Jun 2008 16:47:21 -0400 Subject: [et-mgmt-tools] virt error with F9 and KVM In-Reply-To: <20080604202704.GD19449@redhat.com> References: <4846F9C2.4020004@redhat.com> <20080604202704.GD19449@redhat.com> Message-ID: <4846FF59.7010208@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Daniel P. Berrange wrote: | On Wed, Jun 04, 2008 at 04:23:30PM -0400, John Eckersberg wrote: |> -----BEGIN PGP SIGNED MESSAGE----- |> Hash: SHA1 |> |> Output is attached. I have no idea what 'hvm' is and why it is getting |> attached to the path. I don't have anything like that in my install tree. | | This is a bug fixed upstream | | http://hg.et.redhat.com/virt/applications/virtinst--devel?cs=5f10c7c171af | | Can you file a BZ against it and we'll get it pushed to Fedora updates | | Dan. Done: https://bugzilla.redhat.com/show_bug.cgi?id=450032 Thanks a ton, - -- John Eckersberg Production Operations Red Hat, Inc. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkhG/1kACgkQO5VSO/Qqm+j9GACdHnjCNd2SrbNtjS0p7tWVCXeJ vRYAnimW56xSUxf+Tsco7GiU30I0mtKg =wa8a -----END PGP SIGNATURE----- From mdehaan at redhat.com Wed Jun 4 23:55:52 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Wed, 04 Jun 2008 19:55:52 -0400 Subject: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) In-Reply-To: <26AA63832ED7774DBFB9FFB39B337C00243C6E72@nj0cech03.lnholdings.com> References: <4845AC13.7080400@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C68F4@nj0cech03.lnholdings.com> <4845AF71.8020709@redhat.com> <4845B79E.5050706@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C694D@nj0cech03.lnholdings.com> <26AA63832ED7774DBFB9FFB39B337C00243C69CD@nj0cech03.lnholdings.com> <26AA63832ED7774DBFB9FFB39B337C00243C69D0@nj0cech03.lnholdings.com> <48469C68.4030902@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C6D05@nj0cech03.lnholdings.com> <4846AE0F.9080103@redhat.com> <4846B094.9020307@redhat.com> <26AA63832ED7774DBFB9FFB39B337C00243C6E66@nj0cech03.lnholdings.com> <26AA63832ED7774DBFB9FFB39B337C00243C6E72@nj0cech03.lnholdings.com> Message-ID: <48472B88.4050908@redhat.com> Joseph Boyer Jr. wrote: > Forgot to mention that it is the rpmLIST snippet that is breaking things, it did work well in .8.3 all others seem to work > > It looks like you wanted "SNIPPET::rpmLIST" in your template, not "snippet rpmLIST". Yes? Incidentally you probably want to just use the "Advanced Snippets" stuff mentioned on the Wiki now as it means you no longer need that #include hack. Cobbler will allow you to maintain a package list that varies based on the profile and/or system. Check it out... > Joseph Boyer Jr > Enterprise Technology Services > Liquidnet Holdings, Inc. > Joseph.Boyer at liquidnet.com > T +1 646.660.8352 > C +1 646.284.8394 > > > -----Original Message----- > From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Joseph Boyer Jr. > Sent: Wednesday, June 04, 2008 12:22 PM > To: Fedora/Linux Management Tools > Subject: RE: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) > > Hi Mike... > > I have posted my tmpl file to http://cobbler.pastebin.com and here they are as well. I have also included my snippets in this email. > > Thanks for the help! > > Cheers, > joe > > Joseph Boyer Jr > Enterprise Technology Services > Liquidnet Holdings, Inc. > Joseph.Boyer at liquidnet.com > T +1 646.660.8352 > C +1 646.284.8394 > > > -----Original Message----- > From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Michael DeHaan > Sent: Wednesday, June 04, 2008 11:11 AM > To: Fedora/Linux Management Tools > Subject: Re: [et-mgmt-tools] [ANNOUNCE] Cobbler 1.0.1 (minor fixes) > > Michael DeHaan wrote: > >> Joseph Boyer Jr. wrote: >> >>> Hi Mike... >>> >>> Here are the trace backs from wget >>> http://10.0.254.169/cblr/svc/op/ks/system/ny0dlab01, and >>> /var/log/cobbler/cobbler.log >>> >>> Wget ks template... >>> >>> ExpatError: not well-formed (invalid token): line 219, column 5 >>> >>> >>> >>> Cobbler.log >>> >>> 2008-06-04 10:24:16,738 - remote - login succeeded; >>> user(jboyer at LNHOLDINGS.COM) >>> 2008-06-04 10:24:16,815 - remote - get_profiles; user(?) >>> 2008-06-04 10:24:18,633 - remote - generate_kickstart; user(?) >>> 2008-06-04 10:24:18,634 - api - generate_kickstart >>> 2008-06-04 10:24:18,817 - api - Exception occured: >>> exceptions.NameError >>> 2008-06-04 10:24:18,817 - api - Exception value: global name '_' is >>> not defined >>> 2008-06-04 10:24:18,822 - api - Exception Info: >>> File "/usr/lib/python2.4/site-packages/cobbler/kickgen.py", line >>> 80, in generate_kickstart_for_profile >>> data = self.templar.render(kfile, meta, None, g) >>> File "/usr/lib/python2.4/site-packages/cobbler/templar.py", line >>> 88, in render >>> print _("There appears to be an formatting error in the template >>> file.") >>> >>> >>> >> Can you email me your template file? (http://cobbler.pastebin.com >> works pretty well for this... perhaps you want to join #cobbler on >> irc.freenode.net and share it) >> >> It appears that there is something wrong about a "_", and around 219, >> but without looking at the file it's hard to say. >> >> --Michael >> >> > Actually the bit about "_" is an error while trying to give you the error message. > > > This will fix your logging so you can see the rest of the Cheetah error in /var/log/cobbler/cobbler.log: > > --- a/cobbler/templar.py > +++ b/cobbler/templar.py > @@ -17,9 +17,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. > import os > import os.path > import glob > -import utils > from cexceptions import * > from Cheetah.Template import Template > +from utils import * > +import utils > > class Templar: > > I have already applied that fix to the logging messages, though the error should be a syntax one you still need to fix, after reading the logs to figure out what it is. > > >> _______________________________________________ >> et-mgmt-tools mailing list >> et-mgmt-tools at redhat.com >> https://www.redhat.com/mailman/listinfo/et-mgmt-tools >> > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > > > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > From sakaia at jp.fujitsu.com Thu Jun 5 08:18:06 2008 From: sakaia at jp.fujitsu.com (Atsushi SAKAI) Date: Thu, 05 Jun 2008 17:18:06 +0900 Subject: [et-mgmt-tools] Question about the reason of disabling create remote guest. Message-ID: <200806050818.m558I7ox030789@fjmscan502.ms.jp.fujitsu.com> Hi, Dan I have a question about remote guest creation on virt-manager. Is there any reason of disabling functionality? http://hg.et.redhat.com/virt/applications/virt-manager--devel?cs=686a43c1c0e7 I am looking around the ML archive but I cannot found the reason. Thanks Atsushi SAKAI From tom at ng23.net Thu Jun 5 08:48:56 2008 From: tom at ng23.net (Tom Brown) Date: Thu, 05 Jun 2008 09:48:56 +0100 Subject: [et-mgmt-tools] dhcpctl_connect: connection refused - cobbler-1.0.1-2 Message-ID: <4847A878.3000009@ng23.net> Hi Upgraded to the latest cobbler and set my settings file to enable omapi omapi_enabled: 1 in my dhcpd.template i added the following as per the .rpmnew example if $omapi_enabled omapi-port $omapi_port; end if Running a cobbler sync i am left with dhcpctl_connect: connection refused and trying to restart dhcp after the sync to take into account this addition to the dhcpd.conf i get Starting dhcpd: Internet Systems Consortium DHCP Server V3.0.1 Copyright 2004 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ /etc/dhcpd.conf line 11: Expecting a boolean expression. if 1 ^ /etc/dhcpd.conf line 13: semicolon expected. end if ^ Configuration file errors encountered -- exiting any ideas? thanks From Pablo.Iranzo at redhat.com Thu Jun 5 09:21:26 2008 From: Pablo.Iranzo at redhat.com (Pablo Iranzo =?ISO-8859-1?Q?G=F3mez?=) Date: Thu, 05 Jun 2008 11:21:26 +0200 Subject: [et-mgmt-tools] dhcpctl_connect: connection refused - cobbler-1.0.1-2 In-Reply-To: <4847A878.3000009@ng23.net> References: <4847A878.3000009@ng23.net> Message-ID: <1212657686.12551.58.camel@iranzo.users.redhat.com> ?Can you post the generated /etc/dhcpd.conf file? Thanks Pablo El jue, 05-06-2008 a las 09:48 +0100, Tom Brown escribi?: > Hi > > Upgraded to the latest cobbler and set my settings file to enable omapi > > omapi_enabled: 1 > > in my dhcpd.template i added the following as per the .rpmnew example > > if $omapi_enabled > omapi-port $omapi_port; > end if > > Running a cobbler sync i am left with > > dhcpctl_connect: connection refused > > and trying to restart dhcp after the sync to take into account this > addition to the dhcpd.conf i get > > Starting dhcpd: Internet Systems Consortium DHCP Server V3.0.1 > Copyright 2004 Internet Systems Consortium. > All rights reserved. > For info, please visit http://www.isc.org/sw/dhcp/ > /etc/dhcpd.conf line 11: Expecting a boolean expression. > if 1 > ^ > /etc/dhcpd.conf line 13: semicolon expected. > end if > ^ > Configuration file errors encountered -- exiting > > any ideas? > > thanks > > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools -- Pablo Iranzo G?mez (Pablo.Iranzo at redhat.com) RHCE/Global Profesional Services Consultant Spain Phone: +34 645 01 01 49 (CET/CEST) GnuPG KeyID: 0xFAD3CF0D --- Direcci?n Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta 3?D, 28016 Madrid, Spain Direcci?n Registrada: Red Hat S.L., C/ Velazquez 63, Madrid 28001, Spain Inscrita en el Reg. Mercantil de Madrid ? C.I.F. B82657941 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Esta parte del mensaje est? firmada digitalmente URL: From rjones at redhat.com Thu Jun 5 09:27:41 2008 From: rjones at redhat.com (Richard W.M. Jones) Date: Thu, 5 Jun 2008 10:27:41 +0100 Subject: [et-mgmt-tools] Question about the reason of disabling create remote guest. In-Reply-To: <200806050818.m558I7ox030789@fjmscan502.ms.jp.fujitsu.com> References: <200806050818.m558I7ox030789@fjmscan502.ms.jp.fujitsu.com> Message-ID: <20080605092741.GA7614@amd.home.annexia.org> On Thu, Jun 05, 2008 at 05:18:06PM +0900, Atsushi SAKAI wrote: > I have a question about remote guest creation on virt-manager. > > Is there any reason of disabling functionality? > http://hg.et.redhat.com/virt/applications/virt-manager--devel?cs=686a43c1c0e7 > I am looking around the ML archive but I cannot found the reason. It's just because that bit hasn't been written yet. However all the infrastructure is now in place (capabilities, remote, storage API) so it will work. I think Cole was working on it. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my OCaml programming blog: http://camltastic.blogspot.com/ Fedora now supports 59 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora From tom at ng23.net Thu Jun 5 09:52:45 2008 From: tom at ng23.net (Tom Brown) Date: Thu, 05 Jun 2008 10:52:45 +0100 Subject: [et-mgmt-tools] dhcpctl_connect: connection refused - cobbler-1.0.1-2 In-Reply-To: <1212657686.12551.58.camel@iranzo.users.redhat.com> References: <4847A878.3000009@ng23.net> <1212657686.12551.58.camel@iranzo.users.redhat.com> Message-ID: <4847B76D.6070108@ng23.net> Pablo Iranzo G?mez wrote: > ?Can you post the generated /etc/dhcpd.conf file? > > well the interesting bit it ddns-update-style ad-hoc; allow booting; allow bootp; omapi-port 647; i imagine the rest is mainly my host list of a few hundres machines right now thanks From Pablo.Iranzo at redhat.com Thu Jun 5 10:02:24 2008 From: Pablo.Iranzo at redhat.com (Pablo Iranzo =?ISO-8859-1?Q?G=F3mez?=) Date: Thu, 05 Jun 2008 12:02:24 +0200 Subject: [et-mgmt-tools] dhcpctl_connect: connection refused - cobbler-1.0.1-2 In-Reply-To: <4847B76D.6070108@ng23.net> References: <4847A878.3000009@ng23.net> <1212657686.12551.58.camel@iranzo.users.redhat.com> <4847B76D.6070108@ng23.net> Message-ID: <1212660144.12551.63.camel@iranzo.users.redhat.com> Yes, but you claimed you were receiving: etc/dhcpd.conf line 11: Expecting a boolean expression. if 1 ^ /etc/dhcpd.conf line 13: semicolon expected. end if And I can't find that on this piece of config file :) Regards Pablo El jue, 05-06-2008 a las 10:52 +0100, Tom Brown escribi?: > Pablo Iranzo G?mez wrote: > > ?Can you post the generated /etc/dhcpd.conf file? > > > > > > well the interesting bit it > > ddns-update-style ad-hoc; > allow booting; > allow bootp; > omapi-port 647; > > i imagine > > the rest is mainly my host list of a few hundres machines right now > > thanks > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools -- Pablo Iranzo G?mez (Pablo.Iranzo at redhat.com) RHCE/Global Profesional Services Consultant Spain Phone: +34 645 01 01 49 (CET/CEST) GnuPG KeyID: 0xFAD3CF0D --- Direcci?n Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta 3?D, 28016 Madrid, Spain Direcci?n Registrada: Red Hat S.L., C/ Velazquez 63, Madrid 28001, Spain Inscrita en el Reg. Mercantil de Madrid ? C.I.F. B82657941 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Esta parte del mensaje est? firmada digitalmente URL: From tom at ng23.net Thu Jun 5 10:07:12 2008 From: tom at ng23.net (Tom Brown) Date: Thu, 05 Jun 2008 11:07:12 +0100 Subject: [et-mgmt-tools] dhcpctl_connect: connection refused - cobbler-1.0.1-2 In-Reply-To: <1212660144.12551.63.camel@iranzo.users.redhat.com> References: <4847A878.3000009@ng23.net> <1212657686.12551.58.camel@iranzo.users.redhat.com> <4847B76D.6070108@ng23.net> <1212660144.12551.63.camel@iranzo.users.redhat.com> Message-ID: <4847BAD0.1060504@ng23.net> > Yes, but you claimed you were receiving: > > etc/dhcpd.conf line 11: Expecting a boolean expression. > if 1 > ^ > /etc/dhcpd.conf line 13: semicolon expected. > end if > > And I can't find that on this piece of config file :) > exactly! now things seems to work fine. # /etc/init.d/dhcpd restart Shutting down dhcpd: [ OK ] Starting dhcpd: [ OK ] very strange - i guess i messed up on what order i did everything. thanks for the help! From berrange at redhat.com Thu Jun 5 10:19:37 2008 From: berrange at redhat.com (Daniel P. Berrange) Date: Thu, 5 Jun 2008 11:19:37 +0100 Subject: [et-mgmt-tools] Question about the reason of disabling create remote guest. In-Reply-To: <200806050818.m558I7ox030789@fjmscan502.ms.jp.fujitsu.com> References: <200806050818.m558I7ox030789@fjmscan502.ms.jp.fujitsu.com> Message-ID: <20080605101937.GD3000@redhat.com> On Thu, Jun 05, 2008 at 05:18:06PM +0900, Atsushi SAKAI wrote: > Hi, Dan > > I have a question about remote guest creation on virt-manager. > > Is there any reason of disabling functionality? > http://hg.et.redhat.com/virt/applications/virt-manager--devel?cs=686a43c1c0e7 > I am looking around the ML archive but I cannot found the reason. Historically there wer several problems - It poked in /proc to determine what HV / guests were supported. THis is now fixed since we use the capabilities APIs - It accesses local filesystem to create disk images. This can be fixed by swithcing to use the storage APIs, which I believe Cole has been looking at - It downloads kernel/initrd images to local files. This can be fixed by only allowing PXE for remote hosts, or using storage APIs to find CD ISO images remotely. There's probably a few other loose ends to tidy up, but we're pretty close to being able to suport remote guest creation once the storage APIs are used by virt-manager Regards, Daniel. -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From mdehaan at redhat.com Thu Jun 5 11:50:04 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Thu, 05 Jun 2008 07:50:04 -0400 Subject: [et-mgmt-tools] dhcpctl_connect: connection refused - cobbler-1.0.1-2 In-Reply-To: <4847A878.3000009@ng23.net> References: <4847A878.3000009@ng23.net> Message-ID: <4847D2EC.4000405@redhat.com> Tom Brown wrote: > > Hi > > Upgraded to the latest cobbler and set my settings file to enable omapi > > omapi_enabled: 1 > > in my dhcpd.template i added the following as per the .rpmnew example > > if $omapi_enabled > omapi-port $omapi_port; > end if Looks like you didn't follow the example fully. #if $omapi_enabled Cheetah statements start with a single pound sign. --Michael From tom at ng23.net Thu Jun 5 12:09:15 2008 From: tom at ng23.net (Tom Brown) Date: Thu, 05 Jun 2008 13:09:15 +0100 Subject: [et-mgmt-tools] dhcpctl_connect: connection refused - cobbler-1.0.1-2 In-Reply-To: <4847D2EC.4000405@redhat.com> References: <4847A878.3000009@ng23.net> <4847D2EC.4000405@redhat.com> Message-ID: <4847D76B.7090208@ng23.net> > > Looks like you didn't follow the example fully. > > #if $omapi_enabled > > Cheetah statements start with a single pound sign. > > indeed - my bad From jeremy at rosengren.org Thu Jun 5 16:26:03 2008 From: jeremy at rosengren.org (Jeremy Rosengren) Date: Thu, 5 Jun 2008 11:26:03 -0500 Subject: [et-mgmt-tools] Runtime error, cobbler 1.0.1 Message-ID: <842B7B6B-5634-442B-9993-13379082D9BE@rosengren.org> I checked out the v1.0.1 tag and built the RPM on my CentOS 5 server, then saw the following error when attempting to start cobblerd: Starting cobbler daemon: Traceback (most recent call last): File "/usr/bin/cobblerd", line 19, in ? import cobbler.api as bootapi File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 17, in ? import config File "/usr/lib/python2.4/site-packages/cobbler/config.py", line 23, in ? import collection_distros as distros File "/usr/lib/python2.4/site-packages/cobbler/ collection_distros.py", line 17, in ? import collection File "/usr/lib/python2.4/site-packages/cobbler/collection.py", line 129 self.api.profiles().add(k, save=True, with_sync=with_sync, with_triggers=with_triggers,save=True) SyntaxError: duplicate keyword argument Here's a trivial patch to remove the duplicate keywords: --- cobbler/collection.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cobbler/collection.py b/cobbler/collection.py index 6044993..df866ee 100644 --- a/cobbler/collection.py +++ b/cobbler/collection.py @@ -126,10 +126,10 @@ class Collection(serializable.Serializable): k.set_parent(newname) else: k.set_distro(newname) - self.api.profiles().add(k, save=True, with_sync=with_sync, with_ triggers=with_triggers,save=True) + self.api.profiles().add(k, save=True, with_sync=with_sync, with_ triggers=with_triggers) elif k.COLLECTION_TYPE == "system": k.set_profile(newname) - self.api.systems().add(k, save=True, with_sync=with_sync, with_t riggers=with_triggers,save=True) + self.api.systems().add(k, save=True, with_sync=with_sync, with_t riggers=with_triggers) elif k.COLLECTION_TYPE == "repo": raise CX(_("internal error, not expected to have repo child obje cts")) else: -- 1.5.5.1 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdehaan at redhat.com Thu Jun 5 16:36:27 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Thu, 05 Jun 2008 12:36:27 -0400 Subject: [et-mgmt-tools] Runtime error, cobbler 1.0.1 In-Reply-To: <842B7B6B-5634-442B-9993-13379082D9BE@rosengren.org> References: <842B7B6B-5634-442B-9993-13379082D9BE@rosengren.org> Message-ID: <4848160B.7090707@redhat.com> Jeremy Rosengren wrote: > I checked out the v1.0.1 tag and built the RPM on my CentOS 5 server, > then saw the following error when attempting to start cobblerd: > This has already been corrected and pushed out to the mirrors, (see ML history), so just pull git/head and you will be good to go. --Michael From jeremy at rosengren.org Thu Jun 5 18:12:39 2008 From: jeremy at rosengren.org (Jeremy Rosengren) Date: Thu, 5 Jun 2008 13:12:39 -0500 Subject: [et-mgmt-tools] Runtime error, cobbler 1.0.1 In-Reply-To: <4848160B.7090707@redhat.com> References: <842B7B6B-5634-442B-9993-13379082D9BE@rosengren.org> <4848160B.7090707@redhat.com> Message-ID: <3D3A5391-8222-4020-BA2F-4641105A6066@rosengren.org> On Jun 5, 2008, at 11:36 AM, Michael DeHaan wrote: > Jeremy Rosengren wrote: >> I checked out the v1.0.1 tag and built the RPM on my CentOS 5 >> server, then saw the following error when attempting to start >> cobblerd: >> > > This has already been corrected and pushed out to the mirrors, (see > ML history), so just pull git/head and you will be good to go. Excellent, thanks! -- jeremy From crobinso at redhat.com Fri Jun 6 16:36:00 2008 From: crobinso at redhat.com (Cole Robinson) Date: Fri, 06 Jun 2008 12:36:00 -0400 Subject: [et-mgmt-tools] VMM: Bad app name in about screen caused by deprecated property used in line 9 of vmm-about.glade In-Reply-To: <1208133118.13465.19.camel@mmaccana-laptop> References: <1208133118.13465.19.camel@mmaccana-laptop> Message-ID: <48496770.7070503@redhat.com> Mike MacCana wrote: > Minor bug in the VMM 0.5.3 - about screen doesn't show proper name of > app. Fix is: > > Virtual Machine > Manager > > should read > > ??? Virtual Machine > Manager > > As 'name' is deprecated. > > Cheers, > > Mike > Sorry this took so long :/ Committed upstream now: http://hg.et.redhat.com/virt/applications/virt-manager--devel?cs=8083ab66e4d2 Thanks! Cole From crobinso at redhat.com Fri Jun 6 16:39:34 2008 From: crobinso at redhat.com (Cole Robinson) Date: Fri, 06 Jun 2008 12:39:34 -0400 Subject: [et-mgmt-tools] [PATCH][virt-inst] add error message when the number of vcpus is out of range. In-Reply-To: <483E1316.3030000@aa.jp.fujitsu.com> References: <483E1316.3030000@aa.jp.fujitsu.com> Message-ID: <48496846.6070907@redhat.com> Hiroyuki Kaguchi wrote: > Hi, > > When the number of vcpus is out of range, the domain boots with vcpus=1 > successfully. > This patch changes the policy that virt-install exits and shows error message. > Thanks, I've committed this: http://hg.et.redhat.com/virt/applications/virtinst--devel?cs=5481034ec305 - Cole From crobinso at redhat.com Fri Jun 6 17:39:05 2008 From: crobinso at redhat.com (Cole Robinson) Date: Fri, 06 Jun 2008 13:39:05 -0400 Subject: [et-mgmt-tools] [PATCH] virt-inst Package an image for VMware distribution In-Reply-To: <484058D2.6030006@redhat.com> References: <484058D2.6030006@redhat.com> Message-ID: <48497639.8090108@redhat.com> Joey Boggs wrote: > These patches were originally written by David Lutterkort and I've > tweaked the conversion process a little bit to work out some staging issues > > virt-pack will tar all the files for the image into a tarball. The name > and toplevel directory are derived from the name and version of the > image descriptor. Scratch disks are omitted, since they can be rebuilt > when the image is deployed. > Hi Joey, I committed all the patches except the actual virt-pack command, since they were separate and straight forward. ... > +import os, sys, string > +from optparse import OptionParser, OptionValueError > +import subprocess > +import logging > +import libxml2 > +import urlgrabber.progress as progress > + > +import virtinst > +import virtinst.ImageParser > +import virtinst.CapabilitiesParser > +import virtinst.cli as cli > +import virtinst.util as util > +import virtinst.UnWare > + > +import tempfile > + > +import gettext > +import locale > + > +locale.setlocale(locale.LC_ALL, '') > +gettext.bindtextdomain(virtinst.gettext_app, virtinst.gettext_dir) > +gettext.install(virtinst.gettext_app, virtinst.gettext_dir) > + > +class PackageException(Exception): > + def __init__(self, msg): > + Exception.__init__(self, msg) > + > +class Package: > + > + def __init__(self, image): > + self.image = image > + if image.name is None or image.version is None: > + raise PackageException( > + _("The image name and version must be present")) > + self.vername = "%s-%s" % (image.name, image.version) > + self.tmpdir = tempfile.mkdtemp(dir="/var/tmp", prefix="virt-pack") > + self.stagedir = os.path.join(self.tmpdir, self.vername) > + self.files = [] > + > + def add_image_files(self): > + cwd = os.getcwd() > + img = self.image > + self.files.append(os.path.basename(img.filename)) > + try: > + os.chdir(img.base) > + for d in img.storage.keys(): > + disk = img.storage[d] > + if disk.use == disk.USE_SCRATCH: > + if disk.size is None: > + raise PackageException(_("Scratch disk %s does not have a size attribute") % disk.id) > + else: > + if not os.path.exists(disk.file): > + raise PackageException(_("Disk file %s could not be found") % disk.id) > + self.files.append(disk.file) > + finally: > + os.chdir(cwd) Why change directories here? Seems like it could all be avoided if the above check is changed to: os.path.exists(os.path.join(img.base, disk.file)) > + > + def make_vmx_files(self): > + img = virtinst.UnWare.Image(self.image) > + files = img.make(self.image.base) > + self.files.extend(files) > + > + def pack(self, outdir): > + outfile = os.path.join(outdir, self.vername + ".tgz") > + for f in set(self.files): > + dir = os.path.join(self.stagedir, os.path.dirname(f)) > + if not os.path.exists(dir): > + os.makedirs(dir) > + os.symlink(os.path.join(self.image.base, f), > + os.path.join(self.stagedir, f)) > + print "Writing %s" % outfile > + cmd = "tar chzv -C %s -f %s %s" % (self.tmpdir, > + outfile, > + os.path.basename(self.vername)) > + util.system(cmd) > + return outfile > + > +### Option parsing > +def parse_args(): > + parser = OptionParser() > + parser.set_usage("%prog [options] image.xml") > + > + parser.add_option("-o", "--output", type="string", dest="output", > + action="callback", callback=cli.check_before_store, > + help=_("Directory in which packaged file will be put")) > + parser.add_option("-d", "--debug", action="store_true", dest="debug", > + help=_("Print debugging information")) > + > + (options,args) = parser.parse_args() > + if len(args) < 1: > + parser.error(_("You need to provide an image XML descriptor")) > + options.image = args[0] > + > + return options > + > +def main(): > + options = parse_args() > + > + > + cli.setupLogging("virt-pack", options.debug) > + > + image = virtinst.ImageParser.parse_file(os.path.abspath(options.image)) > + > + if image.name is None or image.version is None: > + print >> sys.stderr, _("The image descriptor must contain name and version") > + valid = False > + > + if options.output is None: > + options.output = os.path.join(image.base, "..") > + > + pkg = Package(image) > + try: > + pkg.add_image_files() > + except PackageException, e: > + print >> sys.stderr, "Validation failed: %s", e > + return 1 > + > + try: > + pkg.make_vmx_files() > + pkg.pack(options.output) > + except PackageException, e: > + print >> sys.stderr, "Packaging failed: %s" % e > + return 1 > + Might want to wrap the above two messages in _("...") to mark them as translatable. > +if __name__ == "__main__": > + main() > + > diff -r 2f7a50a57c1c virtinst/UnWare.py > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/virtinst/UnWare.py Wed Dec 12 17:53:53 2007 -0800 > @@ -0,0 +1,291 @@ ... > + > +class Disk: > + """A disk for a VMWare(tm) virtual machine""" > + > + MONOLITHIC_FLAT = "monolithicFlat" > + TWO_GB_MAX_EXTENT_SPARSE = "twoGbMaxExtentSparse" > + # This seems only to be usable if the vmdk header is embedded in the > + # data file, not when the descriptor is in a separate text file. Use > + # TWO_GB_MAX_EXTENT_SPARSE instead. > + # VMWare's(tm) documentation of VMDK seriously sucks. A lot. > + MONOLITHIC_SPARSE = "monolithicSparse" > + > + IDE_HEADS = 16 > + IDE_SECTORS = 63 > + > + def __init__(self, descriptor, extent, size, dev, format): > + """Create a new disk. DESCRIPTOR is the name of the VMDK descriptor > + file. EXTENT is the name of the file holding the actual data. SIZE > + is the filesize in bytes. DEV identifies the device, for IDE (the > + only one supported right now) it should be $bus:$master. FORMAT is > + the format of the underlying extent, one of the formats defined in > + virtinst.ImageParser.Disk""" > + self.cid = 0xffffffff > + self.createType = Disk.MONOLITHIC_FLAT > + self.descriptor = descriptor > + self.extent = extent > + self.size = size > + self.dev = dev > + self.format = format > + > + def make_extent(self, base): > + """Write the descriptor file, and create the extent as a monolithic > + sparse extent if it does not exist yet""" > + f = os.path.join(base, self.extent) > + print "Checking %s" % f We shouldn't just straight 'print' from a library, even if only one app is using it. I suggest using logging.debug. > + if not os.path.exists(f): > + util.system("qemu-img create -f vmdk %s %d" % (f, self.size/1024)) > + self.createType = Disk.TWO_GB_MAX_EXTENT_SPARSE > + else: > + qemu = os.popen("qemu-img info %s" % f, "r") > + for l in qemu: > + (tag, val) = l.split(":") > + if tag == "file format" and val.strip() == "vmdk": > + self.createType = Disk.TWO_GB_MAX_EXTENT_SPARSE > + qemu.close() > + return self.extent > + > + def to_vmdk(self): > + """Return the VMDK descriptor for this disk""" > + > + vmdk = """# Disk DescriptorFile > +# Generated from libvirt > +version=1 > +""" Generated from libvirt? If putting anything, I guess the best thing would be 'virtinst' > + vmdk += "CID=%08x\nparentCID=ffffffff\n" % self.cid > + vmdk += "createType=\"%s\"\n\n" % self.createType > + vmdk += "# Extent description\n" > + blocks = self.size/512 > + if self.createType == Disk.MONOLITHIC_FLAT: > + vmdk += "RW %d FLAT \"%s\" 0\n" % (blocks, os.path.basename(self.extent)) > + else: # Disk.MONOLITHIC_SPARSE > + vmdk += "RW %d SPARSE \"%s\"\n" % (blocks, os.path.basename(self.extent)) > + > + vmdk += """ > +# Disk Data Base > +ddb.virtualHWVersion = "4" > +ddb.adapterType = \"ide\" > +ddb.geometry.sectors = \"%d\" > +ddb.geometry.heads = \"%d\" > +ddb.geometry.cylinders = \"%d\" > +""" % (Disk.IDE_SECTORS, Disk.IDE_HEADS, blocks/(Disk.IDE_SECTORS*Disk.IDE_HEADS)) > + return vmdk This piece above is kind of a mess. My recommendation is to wrap the entire thing in triple quotes, and just do all the variable calculation prior to the assignment. You won't need to escape anything or manually insert newlines. Or use the same format as used later in the file, just define a _VMDK_TEMPLATE. The rest looks fine to me. - Cole From rjones at redhat.com Fri Jun 6 17:44:12 2008 From: rjones at redhat.com (Richard W.M. Jones) Date: Fri, 6 Jun 2008 18:44:12 +0100 Subject: [et-mgmt-tools] Re: [Fedora-xen] ANNOUNCE: virt-mem: tools for monitoring virtual machines In-Reply-To: References: <20080603231103.GA30478@amd.home.annexia.org> Message-ID: <20080606174412.GA27486@amd.home.annexia.org> On Fri, Jun 06, 2008 at 11:24:12AM -0400, Gast?n Keller wrote: > Hello, Richard. Good news that you are working on a tool to monitor > memory usage of the guests. May I ask to which extent Xen provides > tools for the same purpose? Or maybe they are pretty limited... The free Xen tools only show you the total memory being used by the guest -- equivalent to the amount of RAM installed in the (virtual) machine. They don't tell you how much memory is being used by processes, in swap or in disk buffers. That is my eventual aim with virt-free (part of the virt-mem toolset). I have no idea about XenSource's commercial tools. VMWare offer something similar but you have to install an agent inside the guest. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top From mdehaan at redhat.com Fri Jun 6 19:53:41 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Fri, 06 Jun 2008 15:53:41 -0400 Subject: [et-mgmt-tools] cobbler aclsetup feature Message-ID: <484995C5.3090908@redhat.com> So one of the requests I've gotten a lot is how can I run cobbler as non-root. It's doable with acls, but you have to know which ones to set. I've added the "cobbler aclsetup" command to simply this. Usage: cobbler aclsetup --adduser=mdehaan Now mdehaan can run cobbler commands as himself. Note that the acl permissions granted to mdehaan above are quite large, so we had better hope we can trust him. For the curious those ACL's are: PROCESS_DIRS = { webdir : "rwx", "/var/log/cobbler" : "rwx", "/var/lib/cobbler" : "rwx", "/etc/cobbler" : "rwx", tftpboot : "rwx", "/var/lib/cobbler/triggers" : "rwx" } Should we want to remove them: cobbler aclsetpu --removeuser=mdehaan This also works for groups. It's just "--addgroup" or "--removegroup". If you'd like to play with this, it's on the devel branch in git now. This seems to work for me, one of the next steps seems to be figuring out how to best make this work for cobblerd itself. --Michael From robin-lists at robinbowes.com Fri Jun 6 21:07:51 2008 From: robin-lists at robinbowes.com (Robin Bowes) Date: Fri, 06 Jun 2008 22:07:51 +0100 Subject: [et-mgmt-tools] Re: cobbler aclsetup feature In-Reply-To: <484995C5.3090908@redhat.com> References: <484995C5.3090908@redhat.com> Message-ID: Michael DeHaan wrote: > So one of the requests I've gotten a lot is how can I run cobbler as > non-root. Er, won't sudo take care of this? R. From wright at imageworks.com Fri Jun 6 21:15:36 2008 From: wright at imageworks.com (Peter Wright) Date: Fri, 6 Jun 2008 14:15:36 -0700 Subject: [et-mgmt-tools] Re: cobbler aclsetup feature In-Reply-To: References: Message-ID: <4849A8F8.2040003@imageworks.com> Robin Bowes wrote: > Michael DeHaan wrote: > >> So one of the requests I've gotten a lot is how can I run cobbler as >> non-root. >> > > Er, won't sudo take care of this? > > well cobbler will still run as root, won't it ;) a side effect of using sudo to run cobbler commands is that you get some sort of accounting of commands run for "free" in syslog which i think is kinda nice. Although - using ACLs is may be a more elegant solution since it should help lock down some sites where you want junior admins building systems, but don't trust them with sudo yet. just my two bits though... -p -- Peter Wright Systems Engineer Sony Pictures Imageworks wright at imageworks.com www.imageworks.com From mdehaan at redhat.com Fri Jun 6 21:53:15 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Fri, 06 Jun 2008 17:53:15 -0400 Subject: [et-mgmt-tools] Re: cobbler aclsetup feature In-Reply-To: <4849A8F8.2040003@imageworks.com> References: <4849A8F8.2040003@imageworks.com> Message-ID: <4849B1CB.50809@redhat.com> Peter Wright wrote: > Robin Bowes wrote: >> Michael DeHaan wrote: >> >>> So one of the requests I've gotten a lot is how can I run cobbler as >>> non-root. >>> >> >> Er, won't sudo take care of this? >> >> > well cobbler will still run as root, won't it ;) > > a side effect of using sudo to run cobbler commands is that you get > some sort of accounting of commands run for "free" in syslog which i > think is kinda nice. > Although - using ACLs is may be a more elegant solution since it > should help lock down some sites where you want junior admins building > systems, but don't trust them with sudo yet. > > just my two bits though... > > -p > > > > Cheetah templates can essentially contain code, as can cobbler modules, and triggers are pretty much straight up shell scripts. This keeps them being run as you, rather than root. There were some folks that were concerned about needing to run Cobbler as root, and this is for them :) I agree a properly configured sudoers that allows running of the cobbler binary solves most of the needs, but it doesn't allow you access to edit some of things you might want to edit by hand -- this does -- so IMHO it's a bit cleaner. Some things to check in the future is coming up with a nice way to make cobblerd not need root as well. Maybe that makes sense, maybe it doesn't -- I need to figure it out :) --Michael From mdehaan at redhat.com Fri Jun 6 22:35:41 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Fri, 06 Jun 2008 18:35:41 -0400 Subject: [et-mgmt-tools] koan 1.0.0 is ignoring kernel options Message-ID: <4849BBBD.5040701@redhat.com> I'm pushing out a 1.0.1 shortly. If you're wondering why --replace-self isn't booting fully automatically anymore, that's why. --Michael From mdehaan at redhat.com Fri Jun 6 22:46:53 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Fri, 06 Jun 2008 18:46:53 -0400 Subject: [et-mgmt-tools] koan 1.0.0 is ignoring kernel options In-Reply-To: <4849BBBD.5040701@redhat.com> References: <4849BBBD.5040701@redhat.com> Message-ID: <4849BE5D.5090600@redhat.com> Michael DeHaan wrote: > I'm pushing out a 1.0.1 shortly. > > If you're wondering why --replace-self isn't booting fully > automatically anymore, that's why. > > --Michael > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools I've uploaded a new koan RPM to http://cobbler.et.redhat.com/download -- mirrors will be updated when they update. Cobbler is not affected. --Michael From jboggs at redhat.com Sat Jun 7 00:11:56 2008 From: jboggs at redhat.com (Joey Boggs) Date: Fri, 06 Jun 2008 20:11:56 -0400 Subject: [et-mgmt-tools] [PATCH] virt-inst Package an image for VMware distribution In-Reply-To: <48497639.8090108@redhat.com> References: <484058D2.6030006@redhat.com> <48497639.8090108@redhat.com> Message-ID: <4849D24C.7040302@redhat.com> Cole, I'll work on those changes this weekend/next week, thanks for the comments. Joey Cole Robinson wrote: > Joey Boggs wrote: > >> These patches were originally written by David Lutterkort and I've >> tweaked the conversion process a little bit to work out some staging issues >> >> virt-pack will tar all the files for the image into a tarball. The name >> and toplevel directory are derived from the name and version of the >> image descriptor. Scratch disks are omitted, since they can be rebuilt >> when the image is deployed. >> >> > > Hi Joey, > > I committed all the patches except the actual virt-pack command, since they > were separate and straight forward. > > ... > > >> +import os, sys, string >> +from optparse import OptionParser, OptionValueError >> +import subprocess >> +import logging >> +import libxml2 >> +import urlgrabber.progress as progress >> + >> +import virtinst >> +import virtinst.ImageParser >> +import virtinst.CapabilitiesParser >> +import virtinst.cli as cli >> +import virtinst.util as util >> +import virtinst.UnWare >> + >> +import tempfile >> + >> +import gettext >> +import locale >> + >> +locale.setlocale(locale.LC_ALL, '') >> +gettext.bindtextdomain(virtinst.gettext_app, virtinst.gettext_dir) >> +gettext.install(virtinst.gettext_app, virtinst.gettext_dir) >> + >> +class PackageException(Exception): >> + def __init__(self, msg): >> + Exception.__init__(self, msg) >> + >> +class Package: >> + >> + def __init__(self, image): >> + self.image = image >> + if image.name is None or image.version is None: >> + raise PackageException( >> + _("The image name and version must be present")) >> + self.vername = "%s-%s" % (image.name, image.version) >> + self.tmpdir = tempfile.mkdtemp(dir="/var/tmp", prefix="virt-pack") >> + self.stagedir = os.path.join(self.tmpdir, self.vername) >> + self.files = [] >> + >> + def add_image_files(self): >> + cwd = os.getcwd() >> + img = self.image >> + self.files.append(os.path.basename(img.filename)) >> + try: >> + os.chdir(img.base) >> + for d in img.storage.keys(): >> + disk = img.storage[d] >> + if disk.use == disk.USE_SCRATCH: >> + if disk.size is None: >> + raise PackageException(_("Scratch disk %s does not have a size attribute") % disk.id) >> + else: >> + if not os.path.exists(disk.file): >> + raise PackageException(_("Disk file %s could not be found") % disk.id) >> + self.files.append(disk.file) >> + finally: >> + os.chdir(cwd) >> > > Why change directories here? Seems like it could all be avoided if the > above check is changed to: os.path.exists(os.path.join(img.base, disk.file)) > > >> + >> + def make_vmx_files(self): >> + img = virtinst.UnWare.Image(self.image) >> + files = img.make(self.image.base) >> + self.files.extend(files) >> + >> + def pack(self, outdir): >> + outfile = os.path.join(outdir, self.vername + ".tgz") >> + for f in set(self.files): >> + dir = os.path.join(self.stagedir, os.path.dirname(f)) >> + if not os.path.exists(dir): >> + os.makedirs(dir) >> + os.symlink(os.path.join(self.image.base, f), >> + os.path.join(self.stagedir, f)) >> + print "Writing %s" % outfile >> + cmd = "tar chzv -C %s -f %s %s" % (self.tmpdir, >> + outfile, >> + os.path.basename(self.vername)) >> + util.system(cmd) >> + return outfile >> + >> +### Option parsing >> +def parse_args(): >> + parser = OptionParser() >> + parser.set_usage("%prog [options] image.xml") >> + >> + parser.add_option("-o", "--output", type="string", dest="output", >> + action="callback", callback=cli.check_before_store, >> + help=_("Directory in which packaged file will be put")) >> + parser.add_option("-d", "--debug", action="store_true", dest="debug", >> + help=_("Print debugging information")) >> + >> + (options,args) = parser.parse_args() >> + if len(args) < 1: >> + parser.error(_("You need to provide an image XML descriptor")) >> + options.image = args[0] >> + >> + return options >> + >> +def main(): >> + options = parse_args() >> + >> + >> + cli.setupLogging("virt-pack", options.debug) >> + >> + image = virtinst.ImageParser.parse_file(os.path.abspath(options.image)) >> + >> + if image.name is None or image.version is None: >> + print >> sys.stderr, _("The image descriptor must contain name and version") >> + valid = False >> + >> + if options.output is None: >> + options.output = os.path.join(image.base, "..") >> + >> + pkg = Package(image) >> + try: >> + pkg.add_image_files() >> + except PackageException, e: >> + print >> sys.stderr, "Validation failed: %s", e >> + return 1 >> + >> + try: >> + pkg.make_vmx_files() >> + pkg.pack(options.output) >> + except PackageException, e: >> + print >> sys.stderr, "Packaging failed: %s" % e >> + return 1 >> + >> > > Might want to wrap the above two messages in _("...") to mark them as > translatable. > > >> +if __name__ == "__main__": >> + main() >> + >> diff -r 2f7a50a57c1c virtinst/UnWare.py >> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >> +++ b/virtinst/UnWare.py Wed Dec 12 17:53:53 2007 -0800 >> @@ -0,0 +1,291 @@ >> > > ... > > >> + >> +class Disk: >> + """A disk for a VMWare(tm) virtual machine""" >> + >> + MONOLITHIC_FLAT = "monolithicFlat" >> + TWO_GB_MAX_EXTENT_SPARSE = "twoGbMaxExtentSparse" >> + # This seems only to be usable if the vmdk header is embedded in the >> + # data file, not when the descriptor is in a separate text file. Use >> + # TWO_GB_MAX_EXTENT_SPARSE instead. >> + # VMWare's(tm) documentation of VMDK seriously sucks. A lot. >> + MONOLITHIC_SPARSE = "monolithicSparse" >> + >> + IDE_HEADS = 16 >> + IDE_SECTORS = 63 >> + >> + def __init__(self, descriptor, extent, size, dev, format): >> + """Create a new disk. DESCRIPTOR is the name of the VMDK descriptor >> + file. EXTENT is the name of the file holding the actual data. SIZE >> + is the filesize in bytes. DEV identifies the device, for IDE (the >> + only one supported right now) it should be $bus:$master. FORMAT is >> + the format of the underlying extent, one of the formats defined in >> + virtinst.ImageParser.Disk""" >> + self.cid = 0xffffffff >> + self.createType = Disk.MONOLITHIC_FLAT >> + self.descriptor = descriptor >> + self.extent = extent >> + self.size = size >> + self.dev = dev >> + self.format = format >> + >> + def make_extent(self, base): >> + """Write the descriptor file, and create the extent as a monolithic >> + sparse extent if it does not exist yet""" >> + f = os.path.join(base, self.extent) >> + print "Checking %s" % f >> > > We shouldn't just straight 'print' from a library, even if only one app is using it. > I suggest using logging.debug. > > >> + if not os.path.exists(f): >> + util.system("qemu-img create -f vmdk %s %d" % (f, self.size/1024)) >> + self.createType = Disk.TWO_GB_MAX_EXTENT_SPARSE >> + else: >> + qemu = os.popen("qemu-img info %s" % f, "r") >> + for l in qemu: >> + (tag, val) = l.split(":") >> + if tag == "file format" and val.strip() == "vmdk": >> + self.createType = Disk.TWO_GB_MAX_EXTENT_SPARSE >> + qemu.close() >> + return self.extent >> + >> + def to_vmdk(self): >> + """Return the VMDK descriptor for this disk""" >> + >> + vmdk = """# Disk DescriptorFile >> +# Generated from libvirt >> +version=1 >> +""" >> > > Generated from libvirt? If putting anything, I guess the best thing would be 'virtinst' > > >> + vmdk += "CID=%08x\nparentCID=ffffffff\n" % self.cid >> + vmdk += "createType=\"%s\"\n\n" % self.createType >> + vmdk += "# Extent description\n" >> + blocks = self.size/512 >> + if self.createType == Disk.MONOLITHIC_FLAT: >> + vmdk += "RW %d FLAT \"%s\" 0\n" % (blocks, os.path.basename(self.extent)) >> + else: # Disk.MONOLITHIC_SPARSE >> + vmdk += "RW %d SPARSE \"%s\"\n" % (blocks, os.path.basename(self.extent)) >> + >> + vmdk += """ >> +# Disk Data Base >> +ddb.virtualHWVersion = "4" >> +ddb.adapterType = \"ide\" >> +ddb.geometry.sectors = \"%d\" >> +ddb.geometry.heads = \"%d\" >> +ddb.geometry.cylinders = \"%d\" >> +""" % (Disk.IDE_SECTORS, Disk.IDE_HEADS, blocks/(Disk.IDE_SECTORS*Disk.IDE_HEADS)) >> + return vmdk >> > > This piece above is kind of a mess. My recommendation is to wrap the entire thing > in triple quotes, and just do all the variable calculation prior to the assignment. > You won't need to escape anything or manually insert newlines. Or use the same > format as used later in the file, just define a _VMDK_TEMPLATE. > > The rest looks fine to me. > > - Cole > From john.dunbar71 at googlemail.com Mon Jun 9 12:31:35 2008 From: john.dunbar71 at googlemail.com (John Dunbar) Date: Mon, 9 Jun 2008 13:31:35 +0100 Subject: [et-mgmt-tools] nopxe.cgi in 1.0? Message-ID: <775fd6100806090531r322e9993qad939d708ef8029d@mail.gmail.com> Hi, Sorry if I've missed something in the upgrade notes but I've just moved from an 8.x to 1.0 and have noticed that nopxe.cgi is missing. What is the preferred method of changing the netboot_enabled option via the postinstall section of kickstart script in 1.0? Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdehaan at redhat.com Mon Jun 9 14:39:33 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Mon, 09 Jun 2008 10:39:33 -0400 Subject: [et-mgmt-tools] nopxe.cgi in 1.0? In-Reply-To: <775fd6100806090531r322e9993qad939d708ef8029d@mail.gmail.com> References: <775fd6100806090531r322e9993qad939d708ef8029d@mail.gmail.com> Message-ID: <484D40A5.2020202@redhat.com> John Dunbar wrote: > Hi, > > Sorry if I've missed something in the upgrade notes but I've just > moved from an 8.x to 1.0 and have noticed that nopxe.cgi is missing. > > What is the preferred method of changing the netboot_enabled option > via the postinstall section of kickstart script in 1.0? > > Thanks, > The same pxe_just_once variable still is present, except that it is no longer backed by cgi. Instead, we use mod_python. The URLs you should see generated in post are of the form: http://cobbler.example.com/cblr/svc/op/nopxe/system/$name Remember, you can look at kickstarts as cobbler generates them by visiting the URLs http://cobbler.example.com/cblr/svc/op/ks/profile/$name OR http://cobbler.example.com/cblr/svc/op/ks/system/$name The PXE boot loop prevention magic only applies to per-system kickstarts. Also if you log in through the Web user interface, you will see a link to the above URLs. If you were already using pxe_just_once as a variable in /etc/cobbler/settings (formerly /var/lib/cobbler/settings), then no change should be required and the new URLs should be generated instead of the old ones as long as you continue to use the same placeholder variables at the bottom of your template, which is simply just: $kickstart_done Hopefully that answers the question (or over-answers it :)) -- if you're still stuck let me know. --Michael > ------------------------------------------------------------------------ > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From eamonn.walsh at gmail.com Mon Jun 9 14:53:52 2008 From: eamonn.walsh at gmail.com (Eamonn Walsh) Date: Mon, 9 Jun 2008 15:53:52 +0100 Subject: [et-mgmt-tools] Enable/Disable netboot for whole profile Message-ID: Hi Guy, What you would recommend as the best way to turn on or off the enable-netboot setting for systems assigned to a certain profile. - Eamonn -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdehaan at redhat.com Mon Jun 9 15:03:39 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Mon, 09 Jun 2008 11:03:39 -0400 Subject: [et-mgmt-tools] Enable/Disable netboot for whole profile In-Reply-To: References: Message-ID: <484D464B.8030905@redhat.com> > > What you would recommend as the best way to turn on or off the > enable-netboot setting for systems assigned to a certain profile. Ideally we'd run a non-existant command like this: cobbler system find --profile=foo | xargs cobbler system edit --netboot-enabled=0 But wait, we can't do that yet! That's on my nice-to-have list though. Thankfully you can do this pretty quickly now with a Python script: #!/usr/bin/python import cobbler.api as capi api = capi.BootAPI() systems = api.find_system(profile="parent-name-goes-here",return_list=True) for s in systems: s.set_netboot_enabled(False) api.add_system(s) # save it after changing it Hopefully that gets a few more people interested in the Cobbler API too :) --Michael From eamonn.walsh at gmail.com Mon Jun 9 15:06:28 2008 From: eamonn.walsh at gmail.com (Eamonn Walsh) Date: Mon, 9 Jun 2008 16:06:28 +0100 Subject: [et-mgmt-tools] Enable/Disable netboot for whole profile In-Reply-To: <484D464B.8030905@redhat.com> References: <484D464B.8030905@redhat.com> Message-ID: Perfect, just what I was looking for. Thanks, Eamonn On Mon, Jun 9, 2008 at 4:03 PM, Michael DeHaan wrote: > > >> What you would recommend as the best way to turn on or off the >> enable-netboot setting for systems assigned to a certain profile. >> > > Ideally we'd run a non-existant command like this: > > cobbler system find --profile=foo | xargs cobbler system edit > --netboot-enabled=0 > > But wait, we can't do that yet! That's on my nice-to-have list though. > Thankfully you can do this pretty quickly now with a Python script: > > #!/usr/bin/python > import cobbler.api as capi > api = capi.BootAPI() > systems = api.find_system(profile="parent-name-goes-here",return_list=True) > for s in systems: > s.set_netboot_enabled(False) > api.add_system(s) # save it after changing it > > > Hopefully that gets a few more people interested in the Cobbler API too :) > > --Michael > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jboggs at redhat.com Mon Jun 9 17:08:33 2008 From: jboggs at redhat.com (Joey Boggs) Date: Mon, 09 Jun 2008 13:08:33 -0400 Subject: [et-mgmt-tools] [PATCH] virt-inst Package an image for VMware distribution In-Reply-To: <48497639.8090108@redhat.com> References: <484058D2.6030006@redhat.com> <48497639.8090108@redhat.com> Message-ID: <484D6391.5060800@redhat.com> Updated virt-pack and Unware.py per suggestions Cole Robinson wrote: > Joey Boggs wrote: > >> These patches were originally written by David Lutterkort and I've >> tweaked the conversion process a little bit to work out some staging issues >> >> virt-pack will tar all the files for the image into a tarball. The name >> and toplevel directory are derived from the name and version of the >> image descriptor. Scratch disks are omitted, since they can be rebuilt >> when the image is deployed. >> >> > > Hi Joey, > > I committed all the patches except the actual virt-pack command, since they > were separate and straight forward. > > ... > > >> +import os, sys, string >> +from optparse import OptionParser, OptionValueError >> +import subprocess >> +import logging >> +import libxml2 >> +import urlgrabber.progress as progress >> + >> +import virtinst >> +import virtinst.ImageParser >> +import virtinst.CapabilitiesParser >> +import virtinst.cli as cli >> +import virtinst.util as util >> +import virtinst.UnWare >> + >> +import tempfile >> + >> +import gettext >> +import locale >> + >> +locale.setlocale(locale.LC_ALL, '') >> +gettext.bindtextdomain(virtinst.gettext_app, virtinst.gettext_dir) >> +gettext.install(virtinst.gettext_app, virtinst.gettext_dir) >> + >> +class PackageException(Exception): >> + def __init__(self, msg): >> + Exception.__init__(self, msg) >> + >> +class Package: >> + >> + def __init__(self, image): >> + self.image = image >> + if image.name is None or image.version is None: >> + raise PackageException( >> + _("The image name and version must be present")) >> + self.vername = "%s-%s" % (image.name, image.version) >> + self.tmpdir = tempfile.mkdtemp(dir="/var/tmp", prefix="virt-pack") >> + self.stagedir = os.path.join(self.tmpdir, self.vername) >> + self.files = [] >> + >> + def add_image_files(self): >> + cwd = os.getcwd() >> + img = self.image >> + self.files.append(os.path.basename(img.filename)) >> + try: >> + os.chdir(img.base) >> + for d in img.storage.keys(): >> + disk = img.storage[d] >> + if disk.use == disk.USE_SCRATCH: >> + if disk.size is None: >> + raise PackageException(_("Scratch disk %s does not have a size attribute") % disk.id) >> + else: >> + if not os.path.exists(disk.file): >> + raise PackageException(_("Disk file %s could not be found") % disk.id) >> + self.files.append(disk.file) >> + finally: >> + os.chdir(cwd) >> > > Why change directories here? Seems like it could all be avoided if the > above check is changed to: os.path.exists(os.path.join(img.base, disk.file)) > > >> + >> + def make_vmx_files(self): >> + img = virtinst.UnWare.Image(self.image) >> + files = img.make(self.image.base) >> + self.files.extend(files) >> + >> + def pack(self, outdir): >> + outfile = os.path.join(outdir, self.vername + ".tgz") >> + for f in set(self.files): >> + dir = os.path.join(self.stagedir, os.path.dirname(f)) >> + if not os.path.exists(dir): >> + os.makedirs(dir) >> + os.symlink(os.path.join(self.image.base, f), >> + os.path.join(self.stagedir, f)) >> + print "Writing %s" % outfile >> + cmd = "tar chzv -C %s -f %s %s" % (self.tmpdir, >> + outfile, >> + os.path.basename(self.vername)) >> + util.system(cmd) >> + return outfile >> + >> +### Option parsing >> +def parse_args(): >> + parser = OptionParser() >> + parser.set_usage("%prog [options] image.xml") >> + >> + parser.add_option("-o", "--output", type="string", dest="output", >> + action="callback", callback=cli.check_before_store, >> + help=_("Directory in which packaged file will be put")) >> + parser.add_option("-d", "--debug", action="store_true", dest="debug", >> + help=_("Print debugging information")) >> + >> + (options,args) = parser.parse_args() >> + if len(args) < 1: >> + parser.error(_("You need to provide an image XML descriptor")) >> + options.image = args[0] >> + >> + return options >> + >> +def main(): >> + options = parse_args() >> + >> + >> + cli.setupLogging("virt-pack", options.debug) >> + >> + image = virtinst.ImageParser.parse_file(os.path.abspath(options.image)) >> + >> + if image.name is None or image.version is None: >> + print >> sys.stderr, _("The image descriptor must contain name and version") >> + valid = False >> + >> + if options.output is None: >> + options.output = os.path.join(image.base, "..") >> + >> + pkg = Package(image) >> + try: >> + pkg.add_image_files() >> + except PackageException, e: >> + print >> sys.stderr, "Validation failed: %s", e >> + return 1 >> + >> + try: >> + pkg.make_vmx_files() >> + pkg.pack(options.output) >> + except PackageException, e: >> + print >> sys.stderr, "Packaging failed: %s" % e >> + return 1 >> + >> > > Might want to wrap the above two messages in _("...") to mark them as > translatable. > > >> +if __name__ == "__main__": >> + main() >> + >> diff -r 2f7a50a57c1c virtinst/UnWare.py >> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >> +++ b/virtinst/UnWare.py Wed Dec 12 17:53:53 2007 -0800 >> @@ -0,0 +1,291 @@ >> > > ... > > >> + >> +class Disk: >> + """A disk for a VMWare(tm) virtual machine""" >> + >> + MONOLITHIC_FLAT = "monolithicFlat" >> + TWO_GB_MAX_EXTENT_SPARSE = "twoGbMaxExtentSparse" >> + # This seems only to be usable if the vmdk header is embedded in the >> + # data file, not when the descriptor is in a separate text file. Use >> + # TWO_GB_MAX_EXTENT_SPARSE instead. >> + # VMWare's(tm) documentation of VMDK seriously sucks. A lot. >> + MONOLITHIC_SPARSE = "monolithicSparse" >> + >> + IDE_HEADS = 16 >> + IDE_SECTORS = 63 >> + >> + def __init__(self, descriptor, extent, size, dev, format): >> + """Create a new disk. DESCRIPTOR is the name of the VMDK descriptor >> + file. EXTENT is the name of the file holding the actual data. SIZE >> + is the filesize in bytes. DEV identifies the device, for IDE (the >> + only one supported right now) it should be $bus:$master. FORMAT is >> + the format of the underlying extent, one of the formats defined in >> + virtinst.ImageParser.Disk""" >> + self.cid = 0xffffffff >> + self.createType = Disk.MONOLITHIC_FLAT >> + self.descriptor = descriptor >> + self.extent = extent >> + self.size = size >> + self.dev = dev >> + self.format = format >> + >> + def make_extent(self, base): >> + """Write the descriptor file, and create the extent as a monolithic >> + sparse extent if it does not exist yet""" >> + f = os.path.join(base, self.extent) >> + print "Checking %s" % f >> > > We shouldn't just straight 'print' from a library, even if only one app is using it. > I suggest using logging.debug. > > >> + if not os.path.exists(f): >> + util.system("qemu-img create -f vmdk %s %d" % (f, self.size/1024)) >> + self.createType = Disk.TWO_GB_MAX_EXTENT_SPARSE >> + else: >> + qemu = os.popen("qemu-img info %s" % f, "r") >> + for l in qemu: >> + (tag, val) = l.split(":") >> + if tag == "file format" and val.strip() == "vmdk": >> + self.createType = Disk.TWO_GB_MAX_EXTENT_SPARSE >> + qemu.close() >> + return self.extent >> + >> + def to_vmdk(self): >> + """Return the VMDK descriptor for this disk""" >> + >> + vmdk = """# Disk DescriptorFile >> +# Generated from libvirt >> +version=1 >> +""" >> > > Generated from libvirt? If putting anything, I guess the best thing would be 'virtinst' > > >> + vmdk += "CID=%08x\nparentCID=ffffffff\n" % self.cid >> + vmdk += "createType=\"%s\"\n\n" % self.createType >> + vmdk += "# Extent description\n" >> + blocks = self.size/512 >> + if self.createType == Disk.MONOLITHIC_FLAT: >> + vmdk += "RW %d FLAT \"%s\" 0\n" % (blocks, os.path.basename(self.extent)) >> + else: # Disk.MONOLITHIC_SPARSE >> + vmdk += "RW %d SPARSE \"%s\"\n" % (blocks, os.path.basename(self.extent)) >> + >> + vmdk += """ >> +# Disk Data Base >> +ddb.virtualHWVersion = "4" >> +ddb.adapterType = \"ide\" >> +ddb.geometry.sectors = \"%d\" >> +ddb.geometry.heads = \"%d\" >> +ddb.geometry.cylinders = \"%d\" >> +""" % (Disk.IDE_SECTORS, Disk.IDE_HEADS, blocks/(Disk.IDE_SECTORS*Disk.IDE_HEADS)) >> + return vmdk >> > > This piece above is kind of a mess. My recommendation is to wrap the entire thing > in triple quotes, and just do all the variable calculation prior to the assignment. > You won't need to escape anything or manually insert newlines. Or use the same > format as used later in the file, just define a _VMDK_TEMPLATE. > > The rest looks fine to me. > > - Cole > -------------- next part -------------- A non-text attachment was scrubbed... Name: package.patch Type: text/x-patch Size: 15796 bytes Desc: not available URL: From mdehaan at redhat.com Mon Jun 9 20:22:59 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Mon, 09 Jun 2008 16:22:59 -0400 Subject: [et-mgmt-tools] Command Line Search (was: Enable/Disable netboot for whole profile) In-Reply-To: References: <484D464B.8030905@redhat.com> Message-ID: <484D9123.2050704@redhat.com> Eamonn Walsh wrote: > Perfect, just what I was looking for. > > Thanks, > > Eamonn > > On Mon, Jun 9, 2008 at 4:03 PM, Michael DeHaan > wrote: > > > > What you would recommend as the best way to turn on or off the > enable-netboot setting for systems assigned to a certain profile. > > I've just implemented this today and it could use some testing... https://fedorahosted.org/cobbler/wiki/CommandLineSearch (This is on the devel branch of git.) Ideally things like MAC addresses would take wildcards, that's TBA. For the 1.0 version, the Python API is the best way to go. --Michael From adrian.revill at shazamteam.com Tue Jun 10 09:50:37 2008 From: adrian.revill at shazamteam.com (Adrian Revill) Date: Tue, 10 Jun 2008 10:50:37 +0100 Subject: [et-mgmt-tools] Error when creating repo Message-ID: <484E4E6D.4030706@shazamteam.com> Im not sure if ive missed a step, but i am setting up a new install of cobbler 1.0.1-2 on rhel5.2 I have run # cobbler repo add --name rhel-x86_64-server-5 --mirror=rhn://rhel-x86_64-server-5 and it seems to have setup /var/lib/cobbler/repo ok I then run #cobbler reposync and i get an error - creating: /var/www/cobbler/repo_mirror/.origin/rhel-x86_64-server-5.repo - creating: /var/www/cobbler/repo_mirror/rhel-x86_64-server-5/config.repo exceptions.IOError [Errno 2] No such file or directory: '/var/www/cobbler/repo_mirror/rhel-x86_64-server-5/config.repo' File "/usr/lib/python2.4/site-packages/cobbler/cobbler.py", line 65, in main return BootCLI().run(sys.argv) File "/usr/lib/python2.4/site-packages/cobbler/cobbler.py", line 44, in run return self.loader.run(args) File "/usr/lib/python2.4/site-packages/cobbler/commands.py", line 69, in run return fn.run() File "/usr/lib/python2.4/site-packages/cobbler/modules/cli_misc.py", line 227, in run return self.api.reposync(self.options.only) File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 349, in reposync return reposync.run(name) File "/usr/lib/python2.4/site-packages/cobbler/action_reposync.py", line 78, in run self.do_reposync(repo) File "/usr/lib/python2.4/site-packages/cobbler/action_reposync.py", line 198, in do_reposync self.create_local_file(repo, dest_path) File "/usr/lib/python2.4/site-packages/cobbler/action_reposync.py", line 248, in create_local_file config_file = open(fname, "w+") If i create the directory /var/www/cobbler/repo_mirror/rhel-x86_64-server-5 then it cures the error From mdehaan at redhat.com Tue Jun 10 12:45:10 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Tue, 10 Jun 2008 08:45:10 -0400 Subject: [et-mgmt-tools] Error when creating repo In-Reply-To: <484E4E6D.4030706@shazamteam.com> References: <484E4E6D.4030706@shazamteam.com> Message-ID: <484E7756.7080909@redhat.com> Adrian Revill wrote: > Im not sure if ive missed a step, but i am setting up a new install of > cobbler 1.0.1-2 on rhel5.2 > > I have run > # cobbler repo add --name rhel-x86_64-server-5 > --mirror=rhn://rhel-x86_64-server-5 > > and it seems to have setup /var/lib/cobbler/repo ok > > I then run > #cobbler reposync Thanks for the heads up. Can you please file a Trac item here? https://fedorahosted.org/cobbler If you don't have a Fedora account it can be easily acquired from: https://admin.fedoraproject.org/accounts --Michael > > and i get an error > > - creating: > /var/www/cobbler/repo_mirror/.origin/rhel-x86_64-server-5.repo > - creating: /var/www/cobbler/repo_mirror/rhel-x86_64-server-5/config.repo > exceptions.IOError > [Errno 2] No such file or directory: > '/var/www/cobbler/repo_mirror/rhel-x86_64-server-5/config.repo' > File "/usr/lib/python2.4/site-packages/cobbler/cobbler.py", line 65, > in main > return BootCLI().run(sys.argv) > File "/usr/lib/python2.4/site-packages/cobbler/cobbler.py", line 44, > in run > return self.loader.run(args) > File "/usr/lib/python2.4/site-packages/cobbler/commands.py", line > 69, in run > return fn.run() > File "/usr/lib/python2.4/site-packages/cobbler/modules/cli_misc.py", > line 227, in run > return self.api.reposync(self.options.only) > File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 349, in > reposync > > return reposync.run(name) > File "/usr/lib/python2.4/site-packages/cobbler/action_reposync.py", > line 78, in run > self.do_reposync(repo) > File "/usr/lib/python2.4/site-packages/cobbler/action_reposync.py", > line 198, > in do_reposync > self.create_local_file(repo, dest_path) > File "/usr/lib/python2.4/site-packages/cobbler/action_reposync.py", > line 248, > in create_local_file > config_file = open(fname, "w+") > > If i create the directory > /var/www/cobbler/repo_mirror/rhel-x86_64-server-5 then it cures the error > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From adrian.revill at shazamteam.com Tue Jun 10 13:11:15 2008 From: adrian.revill at shazamteam.com (Adrian Revill) Date: Tue, 10 Jun 2008 14:11:15 +0100 Subject: [et-mgmt-tools] rhn reposync failing Message-ID: <484E7D73.4040906@shazamteam.com> I had a rhn reposync working with 0.8, but im now trying to set up cobbler 1.0.1-2 on a new server. As far as i can see the configuration is the same but when ever i run cobbler reposync i get /# cobbler reposync - creating: /var/www/cobbler/repo_mirror/.origin/rhel-x86_64-server-5.repo - createrepo -c cache /var/www/cobbler/repo_mirror/rhel-x86_64-server-5 Saving Primary metadata Saving file lists metadata Saving other metadata - creating: /var/www/cobbler/repo_mirror/rhel-x86_64-server-5/config.repo/ In /var/log/cobbler/cobbler.log all it says is /2008-06-10 11:42:38,268 - api - reposync; [None] / I noticed it is not setting up the yum plugins, i have found that in earlier versions of /usr/bin/reposync the loading of plugins was hard coded on, but in the latest redhat version (yum-utils-1.1.10-9) it is a command line option (-l) I have found a work around, edit /var/lib/cobbler/repos and add -l to the end of the arch: line arch: x86_64 -l This then gets appended to the end of the command args that are passed to reposync by cobbler. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdehaan at redhat.com Tue Jun 10 14:24:07 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Tue, 10 Jun 2008 10:24:07 -0400 Subject: [et-mgmt-tools] rhn reposync failing In-Reply-To: <484E7D73.4040906@shazamteam.com> References: <484E7D73.4040906@shazamteam.com> Message-ID: <484E8E87.8020409@redhat.com> Adrian Revill wrote: > I had a rhn reposync working with 0.8, but im now trying to set up > cobbler 1.0.1-2 on a new server. As far as i can see the configuration > is the same but when ever i run cobbler reposync i get > > /# cobbler reposync > - creating: /var/www/cobbler/repo_mirror/.origin/rhel-x86_64-server-5.repo > - createrepo -c cache /var/www/cobbler/repo_mirror/rhel-x86_64-server-5 > > Saving Primary metadata > Saving file lists metadata > Saving other metadata > - creating: /var/www/cobbler/repo_mirror/rhel-x86_64-server-5/config.repo/ > > In /var/log/cobbler/cobbler.log all it says is > /2008-06-10 11:42:38,268 - api - reposync; [None] > / > I noticed it is not setting up the yum plugins, i have found that in > earlier versions of /usr/bin/reposync the loading of plugins was hard > coded on, but in the latest redhat version (yum-utils-1.1.10-9) it is > a command line option (-l) > > I have found a work around, edit /var/lib/cobbler/repos and add -l to > the end of the arch: line > > arch: x86_64 -l > > This then gets appended to the end of the command args that are passed > to reposync by cobbler. > > > ------------------------------------------------------------------------ > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools Yes, apparently yum-utils changed. As we pretty much need the new version for this functionality, I'll add this. Thanks! --Michael From russell.blaine at sun.com Tue Jun 10 15:14:56 2008 From: russell.blaine at sun.com (Russ Blaine) Date: Tue, 10 Jun 2008 08:14:56 -0700 Subject: [et-mgmt-tools] virt-install defaults to apic on xen: why? Message-ID: <484E9A70.9040507@sun.com> It seems that virt-install 300.3 on xen (HVM) defaults to enabling the apic, even if there is only a single vcpu. Does anyone know why this is the default? It seems that there is a performance penalty when the apic is enabled, so why was this done? - Russ ----------------------------------------------------- Russ Blaine | Solaris Kernel | russell.blaine at sun.com From crobinso at redhat.com Tue Jun 10 18:02:37 2008 From: crobinso at redhat.com (Cole Robinson) Date: Tue, 10 Jun 2008 14:02:37 -0400 Subject: [et-mgmt-tools] [PATCH] virt-inst Package an image for VMware distribution In-Reply-To: <484D6391.5060800@redhat.com> References: <484058D2.6030006@redhat.com> <48497639.8090108@redhat.com> <484D6391.5060800@redhat.com> Message-ID: <484EC1BD.7010507@redhat.com> Joey Boggs wrote: > Updated virt-pack and Unware.py per suggestions > Comments inline: > diff -Naur virtinst--devel.orig/virtinst/UnWare.py virtinst--devel/virtinst/UnWare.py > --- virtinst--devel.orig/virtinst/UnWare.py 1969-12-31 19:00:00.000000000 -0500 > +++ virtinst--devel/virtinst/UnWare.py 2008-06-09 13:03:41.000000000 -0400 > @@ -0,0 +1,309 @@ > +# > +# Processing of VMWare(tm) .vmx files > +# > +# Copyright 2007 Red Hat, Inc. > +# David Lutterkort > +# > +# This program is free software; you can redistribute it and/or modify > +# it under the terms of the GNU General Public License as published by > +# the Free Software Foundation; either version 2 of the License, or > +# (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program; if not, write to the Free Software > +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, > +# MA 02110-1301 USA. > + > +import time > +import sys > +import os > + > +import ImageParser > +import util > + > +class Disk: > + """A disk for a VMWare(tm) virtual machine""" > + > + MONOLITHIC_FLAT = "monolithicFlat" > + TWO_GB_MAX_EXTENT_SPARSE = "twoGbMaxExtentSparse" > + # This seems only to be usable if the vmdk header is embedded in the > + # data file, not when the descriptor is in a separate text file. Use > + # TWO_GB_MAX_EXTENT_SPARSE instead. > + # VMWare's(tm) documentation of VMDK seriously sucks. A lot. > + MONOLITHIC_SPARSE = "monolithicSparse" > + > + IDE_HEADS = 16 > + IDE_SECTORS = 63 > + > + def __init__(self, descriptor, extent, size, dev, format): > + """Create a new disk. DESCRIPTOR is the name of the VMDK descriptor > + file. EXTENT is the name of the file holding the actual data. SIZE > + is the filesize in bytes. DEV identifies the device, for IDE (the > + only one supported right now) it should be $bus:$master. FORMAT is > + the format of the underlying extent, one of the formats defined in > + virtinst.ImageParser.Disk""" > + self.cid = 0xffffffff > + self.createType = Disk.MONOLITHIC_FLAT > + self.descriptor = descriptor > + self.extent = extent > + self.size = size > + self.dev = dev > + self.format = format > + > + def make_extent(self, base): > + """Write the descriptor file, and create the extent as a monolithic > + sparse extent if it does not exist yet""" > + f = os.path.join(base, self.extent) > + print "Checking %s" % f This print is still in place, any reason for that? My previous comment was: > We shouldn't just straight 'print' from a library, even if only one app is using it. > I suggest using logging.debug. > + if not os.path.exists(f): > + util.system("qemu-img create -f vmdk %s %d" % (f, self.size/1024)) > + self.createType = Disk.TWO_GB_MAX_EXTENT_SPARSE > + else: > + qemu = os.popen("qemu-img info %s" % f, "r") > + for l in qemu: > + (tag, val) = l.split(":") > + if tag == "file format" and val.strip() == "vmdk": > + self.createType = Disk.TWO_GB_MAX_EXTENT_SPARSE > + qemu.close() > + return self.extent > + > + def _VMDK_TEMPLATE(self): > + > + blocks = self.size/512 > + if self.createType == Disk.MONOLITHIC_FLAT: > + vmdk_extent_info= "RW %d FLAT \"%s\" 0\n" % (blocks, os.path.basename(self.extent)) > + else: # Disk.MONOLITHIC_SPARSE > + vmdk_extent_info= "RW %d SPARSE \"%s\"\n" % (blocks, os.path.basename(self.extent)) > + > + dict = { > + "SELF_CID" : self.cid, > + "CREATE_TYPE" : self.createType, > + "IDE_SECTORS" : Disk.IDE_SECTORS, > + "IDE_HEADS" : Disk.IDE_HEADS, > + "IDE_BLOCKS" : blocks, > + "IDE_CYLINDERS" : blocks/(Disk.IDE_SECTORS*Disk.IDE_HEADS), > + "VMDK_EXTENT_INFO" : vmdk_extent_info, > + } > + > + vmdk = """# Disk DescriptorFile > +# Generated from virtinst > +version=1 > + > +CID=%(SELF_CID)s > +parentCID=ffffffff > +createType="%(CREATE_TYPE)s" > + > +# Extent description > +%(VMDK_EXTENT_INFO)s > + > +# Disk Data Base > +ddb.virtualHWVersion = "4" > +ddb.adapterType = "ide" > +ddb.geometry.sectors = "%(IDE_SECTORS)s" > +ddb.geometry.heads = "%(IDE_HEADS)s" > +ddb.geometry.cylinders = "%(IDE_CYLINDERS)s" > +""" > + vmdk = vmdk % dict > + return vmdk Not that there are any adverse effects with the current code, but 'dict' is actually used in python referring to the actual dictionary type. So it might be good to use a different variable name here (and there is an example below as well.) > + > + > + def to_vmx(self): > + """Return the fragment for the VMX file for this disk""" > + > + vmx = "" > + dict = { > + "dev" : self.dev, > + "disk_filename" : self.descriptor > + } > + if self.format == ImageParser.Disk.FORMAT_ISO: > + vmx = _VMX_ISO_TEMPLATE % dict > + else: # FORMAT_RAW > + vmx = _VMX_IDE_TEMPLATE % dict > + return vmx > + > +class Image: > + """Represent an image for generation of a VMWare(tm) description""" > + > + def __init__(self, image = None): > + if image is not None: > + self._init_from_image(image) > + > + def _init_from_image(self, image): > + domain = image.domain > + boot = domain.boots[0] > + > + self.base = image.base > + self.name = image.name > + self.descr = image.descr > + self.label = image.label > + self.vcpu = domain.vcpu > + self.memory = domain.memory > + self.interface = domain.interface > + > + self.disks = [] > + for d in boot.drives: > + disk = d.disk > + descriptor = sub_ext(disk.file, ".vmdk") > + if disk.size is None: > + f = os.path.join(image.base, disk.file) > + size = os.stat(f).st_size > + else: > + size = long(disk.size) * 1024L * 1024L > + ide_count = len(self.disks) > + dev = "%d:%d" % (ide_count / 2, ide_count % 2) > + self.disks.append(Disk(descriptor, disk.file, size, dev, > + disk.format)) > + > + def make(self, base): > + """Write the descriptor file and all the disk descriptors""" > + files = [] > + out = open(os.path.join(self.base, self.name + ".vmx"), "w") > + out.write(self.to_vmx()) > + out.close() > + files.append(self.name + ".vmx") > + > + for d in self.disks: > + f = d.make_extent(self.base) > + files.append(f) > + out = open(os.path.join(base, d.descriptor), "w") > + out.write(d._VMDK_TEMPLATE()) > + out.close() > + files.append(d.descriptor) > + return files > + > + def to_vmx(self): > + """Return the VMX description of this image""" > + # Strip blank spaces and EOL to prevent syntax errors in vmx file > + self.descr = self.descr.strip() > + self.descr = self.descr.replace("\n","|") > + > + dict = { > + "now": time.strftime("%Y-%m-%dT%H:%M:%S %Z", time.localtime()), > + "progname": os.path.basename(sys.argv[0]), > + "/image/name": self.name, > + "/image/description": self.descr or "None", > + "/image/label": self.label or self.name, > + "/image/devices/vcpu" : self.vcpu, > + "/image/devices/memory": long(self.memory)/1024 > + } > + > + vmx = _VMX_MAIN_TEMPLATE % dict > + if self.interface: > + vmx += _VMX_ETHER_TEMPLATE > + > + for d in self.disks: > + vmx += d.to_vmx() > + > + return vmx > + > +def sub_ext(filename, ext): > + return os.path.splitext(filename)[0] + ext > + > +_VMX_MAIN_TEMPLATE = """ > +#!/usr/bin/vmplayer > + > +# Generated %(now)s by %(progname)s > +# http://virt-manager.et.redhat.com/ > + > +# This is a Workstation 5 or 5.5 config file > +# It can be used with Player > +config.version = "8" > +virtualHW.version = "4" > + > +# Selected operating system for your virtual machine > +guestOS = "other" > + > +# displayName is your own name for the virtual machine > +displayName = "%(/image/name)s" > + > +# These fields are free text description fields > +annotation = "%(/image/description)s" > +guestinfo.vmware.product.long = "%(/image/label)s" > +guestinfo.vmware.product.url = "http://virt-manager.et.redhat.com/" > +guestinfo.vmware.product.class = "virtual machine" > + > +# Number of virtual CPUs. Your virtual machine will not > +# work if this number is higher than the number of your physical CPUs > +numvcpus = "%(/image/devices/vcpu)s" > + > +# Memory size and other memory settings > +memsize = "%(/image/devices/memory)d" > +MemAllowAutoScaleDown = "FALSE" > +MemTrimRate = "-1" > + > +# Unique ID for the virtual machine will be created > +uuid.action = "create" > + > +## For appliances where tools are installed already, this should really > +## be false, but we don't have that ionfo in the metadata > +# Remind to install VMware Tools > +# This setting has no effect in VMware Player > +tools.remindInstall = "TRUE" > + > +# Startup hints interfers with automatic startup of a virtual machine > +# This setting has no effect in VMware Player > +hints.hideAll = "TRUE" > + > +# Enable time synchronization between computer > +# and virtual machine > +tools.syncTime = "TRUE" > + > +# First serial port, physical COM1 is not available > +serial0.present = "FALSE" > + > +# Optional second serial port, physical COM2 is not available > +serial1.present = "FALSE" > + > +# First parallell port, physical LPT1 is not available > +parallel0.present = "FALSE" > + > +# Logging > +# This config activates logging, and keeps last log > +logging = "TRUE" > +log.fileName = "%(/image/name)s.log" > +log.append = "TRUE" > +log.keepOld = "3" > + > +# These settings decides interaction between your > +# computer and the virtual machine > +isolation.tools.hgfs.disable = "FALSE" > +isolation.tools.dnd.disable = "FALSE" > +isolation.tools.copy.enable = "TRUE" > +isolation.tools.paste.enabled = "TRUE" > + > +# Settings for physical floppy drive > +floppy0.present = "FALSE" > +""" > + > +_VMX_ETHER_TEMPLATE = """ > +## if /image/devices/interface is present: > +# First network interface card > +ethernet0.present = "TRUE" > +ethernet0.connectionType = "nat" > +ethernet0.addressType = "generated" > +ethernet0.generatedAddressOffset = "0" > +ethernet0.autoDetect = "TRUE" > +""" > + > +_VMX_ISO_TEMPLATE = """ > +# CDROM drive > +ide%(dev)s.present = "TRUE" > +ide%(dev)s.deviceType = "cdrom-raw" > +ide%(dev)s.startConnected = "TRUE" > +ide%(dev)s.fileName = "%(disk_filename)s" > +ide%(dev)s.autodetect = "TRUE" > +""" > + > +_VMX_IDE_TEMPLATE = """ > +# IDE disk > +ide%(dev)s.present = "TRUE" > +ide%(dev)s.fileName = "%(disk_filename)s" > +ide%(dev)s.mode = "persistent" > +ide%(dev)s.startConnected = "TRUE" > +ide%(dev)s.writeThrough = "TRUE" > +""" > diff -Naur virtinst--devel.orig/virt-pack virtinst--devel/virt-pack > --- virtinst--devel.orig/virt-pack 1969-12-31 19:00:00.000000000 -0500 > +++ virtinst--devel/virt-pack 2008-06-09 13:03:30.000000000 -0400 > @@ -0,0 +1,146 @@ > +#!/usr/bin/python -tt > +# > +# Package and unpackage images for distribution > +# > +# Copyright 2007 Red Hat, Inc. > +# David Lutterkort > +# > +# This program is free software; you can redistribute it and/or modify > +# it under the terms of the GNU General Public License as published by > +# the Free Software Foundation; either version 2 of the License, or > +# (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program; if not, write to the Free Software > +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, > +# MA 02110-1301 USA. > + > +import os, sys, string > +from optparse import OptionParser, OptionValueError > +import subprocess > +import logging > +import libxml2 > +import urlgrabber.progress as progress > + > +import virtinst > +import virtinst.ImageParser > +import virtinst.CapabilitiesParser > +import virtinst.cli as cli > +import virtinst.util as util > +import virtinst.UnWare > + > +import tempfile > + > +import gettext > +import locale > + > +locale.setlocale(locale.LC_ALL, '') > +gettext.bindtextdomain(virtinst.gettext_app, virtinst.gettext_dir) > +gettext.install(virtinst.gettext_app, virtinst.gettext_dir) > + > +class PackageException(Exception): > + def __init__(self, msg): > + Exception.__init__(self, msg) > + > +class Package: > + > + def __init__(self, image): > + self.image = image > + if image.name is None or image.version is None: > + raise PackageException( > + _("The image name and version must be present")) > + self.vername = "%s-%s" % (image.name, image.version) > + self.tmpdir = tempfile.mkdtemp(dir="/var/tmp", prefix="virt-pack") > + self.stagedir = os.path.join(self.tmpdir, self.vername) > + self.files = [] > + > + def add_image_files(self): > + cwd = os.getcwd() > + img = self.image > + self.files.append(os.path.basename(img.filename)) > + try: > + os.chdir(img.base) > + for d in img.storage.keys(): > + disk = img.storage[d] > + if disk.use == disk.USE_SCRATCH: > + if disk.size is None: > + raise PackageException(_("Scratch disk %s does not have a size attribute") % disk.id) > + else: > + if not os.path.exists(disk.file): > + raise PackageException(_("Disk file %s could not be found") % disk.id) > + self.files.append(disk.file) > + finally: > + os.chdir(cwd) > + Is there any reason for this to still be here that I'm missing? My previous comment was: > Why change directories here? Seems like it could all be avoided if the > above check is changed to: os.path.exists(os.path.join(img.base, disk.file)) > + def make_vmx_files(self): > + img = virtinst.UnWare.Image(self.image) > + files = img.make(self.image.base) > + self.files.extend(files) > + > + def pack(self, outdir): > + outfile = os.path.join(outdir, self.vername + ".tgz") > + for f in set(self.files): > + dir = os.path.join(self.stagedir, os.path.dirname(f)) > + if not os.path.exists(dir): > + os.makedirs(dir) > + # cwd = os.getcwd() > + os.symlink(os.path.join(self.image.base, f), > + os.path.join(self.stagedir, f)) > + print "Writing %s" % outfile > + cmd = "tar chzv -C %s -f %s %s" % (self.tmpdir, > + outfile, > + os.path.basename(self.vername)) > + util.system(cmd) > + return outfile I missed this above message first time around: might want to also wrap "Writing %s" to make it translatable. > + > +### Option parsing > +def parse_args(): > + parser = OptionParser() > + parser.set_usage("%prog [options] image.xml") > + > + parser.add_option("-o", "--output", type="string", dest="output", > + action="callback", callback=cli.check_before_store, > + help=_("Directory in which packaged file will be put")) > + parser.add_option("-d", "--debug", action="store_true", dest="debug", > + help=_("Print debugging information")) > + > + (options,args) = parser.parse_args() > + if len(args) < 1: > + parser.error(_("You need to provide an image XML descriptor")) > + options.image = args[0] > + > + return options > + > +def main(): > + options = parse_args() > + cli.setupLogging("virt-pack", options.debug) > + image = virtinst.ImageParser.parse_file(os.path.abspath(options.image)) > + if image.name is None or image.version is None: > + print >> sys.stderr, _("The image descriptor must contain name and version") > + valid = False > + > + if options.output is None: > + options.output = os.path.join(image.base, "..") > + > + pkg = Package(image) > + try: > + pkg.add_image_files() > + except PackageException, e: > + print >> sys.stderr, _("Validation failed: %s"), e > + return 1 > + > + try: > + pkg.make_vmx_files() > + pkg.pack(options.output) > + except PackageException, e: > + print >> sys.stderr, _("Packaging failed: %s") % e > + return 1 > + > +if __name__ == "__main__": > + main() > + Thanks, Cole From jboggs at redhat.com Tue Jun 10 18:35:23 2008 From: jboggs at redhat.com (Joey Boggs) Date: Tue, 10 Jun 2008 14:35:23 -0400 Subject: [et-mgmt-tools] [PATCH] virt-inst Package an image for VMware distribution In-Reply-To: <484EC1BD.7010507@redhat.com> References: <484058D2.6030006@redhat.com> <48497639.8090108@redhat.com> <484D6391.5060800@redhat.com> <484EC1BD.7010507@redhat.com> Message-ID: <484EC96B.7080300@redhat.com> Some of my changes hadn't saved, not sure why. I made them again and renamed dict to vmdk_dict Cole Robinson wrote: > Joey Boggs wrote: > >> Updated virt-pack and Unware.py per suggestions >> >> > > Comments inline: > > > >> diff -Naur virtinst--devel.orig/virtinst/UnWare.py virtinst--devel/virtinst/UnWare.py >> --- virtinst--devel.orig/virtinst/UnWare.py 1969-12-31 19:00:00.000000000 -0500 >> +++ virtinst--devel/virtinst/UnWare.py 2008-06-09 13:03:41.000000000 -0400 >> @@ -0,0 +1,309 @@ >> +# >> +# Processing of VMWare(tm) .vmx files >> +# >> +# Copyright 2007 Red Hat, Inc. >> +# David Lutterkort >> +# >> +# This program is free software; you can redistribute it and/or modify >> +# it under the terms of the GNU General Public License as published by >> +# the Free Software Foundation; either version 2 of the License, or >> +# (at your option) any later version. >> +# >> +# This program is distributed in the hope that it will be useful, >> +# but WITHOUT ANY WARRANTY; without even the implied warranty of >> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> +# GNU General Public License for more details. >> +# >> +# You should have received a copy of the GNU General Public License >> +# along with this program; if not, write to the Free Software >> +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, >> +# MA 02110-1301 USA. >> + >> +import time >> +import sys >> +import os >> + >> +import ImageParser >> +import util >> + >> +class Disk: >> + """A disk for a VMWare(tm) virtual machine""" >> + >> + MONOLITHIC_FLAT = "monolithicFlat" >> + TWO_GB_MAX_EXTENT_SPARSE = "twoGbMaxExtentSparse" >> + # This seems only to be usable if the vmdk header is embedded in the >> + # data file, not when the descriptor is in a separate text file. Use >> + # TWO_GB_MAX_EXTENT_SPARSE instead. >> + # VMWare's(tm) documentation of VMDK seriously sucks. A lot. >> + MONOLITHIC_SPARSE = "monolithicSparse" >> + >> + IDE_HEADS = 16 >> + IDE_SECTORS = 63 >> + >> + def __init__(self, descriptor, extent, size, dev, format): >> + """Create a new disk. DESCRIPTOR is the name of the VMDK descriptor >> + file. EXTENT is the name of the file holding the actual data. SIZE >> + is the filesize in bytes. DEV identifies the device, for IDE (the >> + only one supported right now) it should be $bus:$master. FORMAT is >> + the format of the underlying extent, one of the formats defined in >> + virtinst.ImageParser.Disk""" >> + self.cid = 0xffffffff >> + self.createType = Disk.MONOLITHIC_FLAT >> + self.descriptor = descriptor >> + self.extent = extent >> + self.size = size >> + self.dev = dev >> + self.format = format >> + >> + def make_extent(self, base): >> + """Write the descriptor file, and create the extent as a monolithic >> + sparse extent if it does not exist yet""" >> + f = os.path.join(base, self.extent) >> + print "Checking %s" % f >> > > > This print is still in place, any reason for that? My previous comment was: > > >> We shouldn't just straight 'print' from a library, even if only one app is using it. >> I suggest using logging.debug. >> > > > >> + if not os.path.exists(f): >> + util.system("qemu-img create -f vmdk %s %d" % (f, self.size/1024)) >> + self.createType = Disk.TWO_GB_MAX_EXTENT_SPARSE >> + else: >> + qemu = os.popen("qemu-img info %s" % f, "r") >> + for l in qemu: >> + (tag, val) = l.split(":") >> + if tag == "file format" and val.strip() == "vmdk": >> + self.createType = Disk.TWO_GB_MAX_EXTENT_SPARSE >> + qemu.close() >> + return self.extent >> + >> + def _VMDK_TEMPLATE(self): >> + >> + blocks = self.size/512 >> + if self.createType == Disk.MONOLITHIC_FLAT: >> + vmdk_extent_info= "RW %d FLAT \"%s\" 0\n" % (blocks, os.path.basename(self.extent)) >> + else: # Disk.MONOLITHIC_SPARSE >> + vmdk_extent_info= "RW %d SPARSE \"%s\"\n" % (blocks, os.path.basename(self.extent)) >> + >> + dict = { >> + "SELF_CID" : self.cid, >> + "CREATE_TYPE" : self.createType, >> + "IDE_SECTORS" : Disk.IDE_SECTORS, >> + "IDE_HEADS" : Disk.IDE_HEADS, >> + "IDE_BLOCKS" : blocks, >> + "IDE_CYLINDERS" : blocks/(Disk.IDE_SECTORS*Disk.IDE_HEADS), >> + "VMDK_EXTENT_INFO" : vmdk_extent_info, >> + } >> + >> + vmdk = """# Disk DescriptorFile >> +# Generated from virtinst >> +version=1 >> + >> +CID=%(SELF_CID)s >> +parentCID=ffffffff >> +createType="%(CREATE_TYPE)s" >> + >> +# Extent description >> +%(VMDK_EXTENT_INFO)s >> + >> +# Disk Data Base >> +ddb.virtualHWVersion = "4" >> +ddb.adapterType = "ide" >> +ddb.geometry.sectors = "%(IDE_SECTORS)s" >> +ddb.geometry.heads = "%(IDE_HEADS)s" >> +ddb.geometry.cylinders = "%(IDE_CYLINDERS)s" >> +""" >> + vmdk = vmdk % dict >> + return vmdk >> > > > Not that there are any adverse effects with the current code, but > 'dict' is actually used in python referring to the actual > dictionary type. So it might be good to use a different variable > name here (and there is an example below as well.) > > > >> + >> + >> + def to_vmx(self): >> + """Return the fragment for the VMX file for this disk""" >> + >> + vmx = "" >> + dict = { >> + "dev" : self.dev, >> + "disk_filename" : self.descriptor >> + } >> + if self.format == ImageParser.Disk.FORMAT_ISO: >> + vmx = _VMX_ISO_TEMPLATE % dict >> + else: # FORMAT_RAW >> + vmx = _VMX_IDE_TEMPLATE % dict >> + return vmx >> + >> +class Image: >> + """Represent an image for generation of a VMWare(tm) description""" >> + >> + def __init__(self, image = None): >> + if image is not None: >> + self._init_from_image(image) >> + >> + def _init_from_image(self, image): >> + domain = image.domain >> + boot = domain.boots[0] >> + >> + self.base = image.base >> + self.name = image.name >> + self.descr = image.descr >> + self.label = image.label >> + self.vcpu = domain.vcpu >> + self.memory = domain.memory >> + self.interface = domain.interface >> + >> + self.disks = [] >> + for d in boot.drives: >> + disk = d.disk >> + descriptor = sub_ext(disk.file, ".vmdk") >> + if disk.size is None: >> + f = os.path.join(image.base, disk.file) >> + size = os.stat(f).st_size >> + else: >> + size = long(disk.size) * 1024L * 1024L >> + ide_count = len(self.disks) >> + dev = "%d:%d" % (ide_count / 2, ide_count % 2) >> + self.disks.append(Disk(descriptor, disk.file, size, dev, >> + disk.format)) >> + >> + def make(self, base): >> + """Write the descriptor file and all the disk descriptors""" >> + files = [] >> + out = open(os.path.join(self.base, self.name + ".vmx"), "w") >> + out.write(self.to_vmx()) >> + out.close() >> + files.append(self.name + ".vmx") >> + >> + for d in self.disks: >> + f = d.make_extent(self.base) >> + files.append(f) >> + out = open(os.path.join(base, d.descriptor), "w") >> + out.write(d._VMDK_TEMPLATE()) >> + out.close() >> + files.append(d.descriptor) >> + return files >> + >> + def to_vmx(self): >> + """Return the VMX description of this image""" >> + # Strip blank spaces and EOL to prevent syntax errors in vmx file >> + self.descr = self.descr.strip() >> + self.descr = self.descr.replace("\n","|") >> + >> + dict = { >> + "now": time.strftime("%Y-%m-%dT%H:%M:%S %Z", time.localtime()), >> + "progname": os.path.basename(sys.argv[0]), >> + "/image/name": self.name, >> + "/image/description": self.descr or "None", >> + "/image/label": self.label or self.name, >> + "/image/devices/vcpu" : self.vcpu, >> + "/image/devices/memory": long(self.memory)/1024 >> + } >> + >> + vmx = _VMX_MAIN_TEMPLATE % dict >> + if self.interface: >> + vmx += _VMX_ETHER_TEMPLATE >> + >> + for d in self.disks: >> + vmx += d.to_vmx() >> + >> + return vmx >> + >> +def sub_ext(filename, ext): >> + return os.path.splitext(filename)[0] + ext >> + >> +_VMX_MAIN_TEMPLATE = """ >> +#!/usr/bin/vmplayer >> + >> +# Generated %(now)s by %(progname)s >> +# http://virt-manager.et.redhat.com/ >> + >> +# This is a Workstation 5 or 5.5 config file >> +# It can be used with Player >> +config.version = "8" >> +virtualHW.version = "4" >> + >> +# Selected operating system for your virtual machine >> +guestOS = "other" >> + >> +# displayName is your own name for the virtual machine >> +displayName = "%(/image/name)s" >> + >> +# These fields are free text description fields >> +annotation = "%(/image/description)s" >> +guestinfo.vmware.product.long = "%(/image/label)s" >> +guestinfo.vmware.product.url = "http://virt-manager.et.redhat.com/" >> +guestinfo.vmware.product.class = "virtual machine" >> + >> +# Number of virtual CPUs. Your virtual machine will not >> +# work if this number is higher than the number of your physical CPUs >> +numvcpus = "%(/image/devices/vcpu)s" >> + >> +# Memory size and other memory settings >> +memsize = "%(/image/devices/memory)d" >> +MemAllowAutoScaleDown = "FALSE" >> +MemTrimRate = "-1" >> + >> +# Unique ID for the virtual machine will be created >> +uuid.action = "create" >> + >> +## For appliances where tools are installed already, this should really >> +## be false, but we don't have that ionfo in the metadata >> +# Remind to install VMware Tools >> +# This setting has no effect in VMware Player >> +tools.remindInstall = "TRUE" >> + >> +# Startup hints interfers with automatic startup of a virtual machine >> +# This setting has no effect in VMware Player >> +hints.hideAll = "TRUE" >> + >> +# Enable time synchronization between computer >> +# and virtual machine >> +tools.syncTime = "TRUE" >> + >> +# First serial port, physical COM1 is not available >> +serial0.present = "FALSE" >> + >> +# Optional second serial port, physical COM2 is not available >> +serial1.present = "FALSE" >> + >> +# First parallell port, physical LPT1 is not available >> +parallel0.present = "FALSE" >> + >> +# Logging >> +# This config activates logging, and keeps last log >> +logging = "TRUE" >> +log.fileName = "%(/image/name)s.log" >> +log.append = "TRUE" >> +log.keepOld = "3" >> + >> +# These settings decides interaction between your >> +# computer and the virtual machine >> +isolation.tools.hgfs.disable = "FALSE" >> +isolation.tools.dnd.disable = "FALSE" >> +isolation.tools.copy.enable = "TRUE" >> +isolation.tools.paste.enabled = "TRUE" >> + >> +# Settings for physical floppy drive >> +floppy0.present = "FALSE" >> +""" >> + >> +_VMX_ETHER_TEMPLATE = """ >> +## if /image/devices/interface is present: >> +# First network interface card >> +ethernet0.present = "TRUE" >> +ethernet0.connectionType = "nat" >> +ethernet0.addressType = "generated" >> +ethernet0.generatedAddressOffset = "0" >> +ethernet0.autoDetect = "TRUE" >> +""" >> + >> +_VMX_ISO_TEMPLATE = """ >> +# CDROM drive >> +ide%(dev)s.present = "TRUE" >> +ide%(dev)s.deviceType = "cdrom-raw" >> +ide%(dev)s.startConnected = "TRUE" >> +ide%(dev)s.fileName = "%(disk_filename)s" >> +ide%(dev)s.autodetect = "TRUE" >> +""" >> + >> +_VMX_IDE_TEMPLATE = """ >> +# IDE disk >> +ide%(dev)s.present = "TRUE" >> +ide%(dev)s.fileName = "%(disk_filename)s" >> +ide%(dev)s.mode = "persistent" >> +ide%(dev)s.startConnected = "TRUE" >> +ide%(dev)s.writeThrough = "TRUE" >> +""" >> diff -Naur virtinst--devel.orig/virt-pack virtinst--devel/virt-pack >> --- virtinst--devel.orig/virt-pack 1969-12-31 19:00:00.000000000 -0500 >> +++ virtinst--devel/virt-pack 2008-06-09 13:03:30.000000000 -0400 >> @@ -0,0 +1,146 @@ >> +#!/usr/bin/python -tt >> +# >> +# Package and unpackage images for distribution >> +# >> +# Copyright 2007 Red Hat, Inc. >> +# David Lutterkort >> +# >> +# This program is free software; you can redistribute it and/or modify >> +# it under the terms of the GNU General Public License as published by >> +# the Free Software Foundation; either version 2 of the License, or >> +# (at your option) any later version. >> +# >> +# This program is distributed in the hope that it will be useful, >> +# but WITHOUT ANY WARRANTY; without even the implied warranty of >> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> +# GNU General Public License for more details. >> +# >> +# You should have received a copy of the GNU General Public License >> +# along with this program; if not, write to the Free Software >> +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, >> +# MA 02110-1301 USA. >> + >> +import os, sys, string >> +from optparse import OptionParser, OptionValueError >> +import subprocess >> +import logging >> +import libxml2 >> +import urlgrabber.progress as progress >> + >> +import virtinst >> +import virtinst.ImageParser >> +import virtinst.CapabilitiesParser >> +import virtinst.cli as cli >> +import virtinst.util as util >> +import virtinst.UnWare >> + >> +import tempfile >> + >> +import gettext >> +import locale >> + >> +locale.setlocale(locale.LC_ALL, '') >> +gettext.bindtextdomain(virtinst.gettext_app, virtinst.gettext_dir) >> +gettext.install(virtinst.gettext_app, virtinst.gettext_dir) >> + >> +class PackageException(Exception): >> + def __init__(self, msg): >> + Exception.__init__(self, msg) >> + >> +class Package: >> + >> + def __init__(self, image): >> + self.image = image >> + if image.name is None or image.version is None: >> + raise PackageException( >> + _("The image name and version must be present")) >> + self.vername = "%s-%s" % (image.name, image.version) >> + self.tmpdir = tempfile.mkdtemp(dir="/var/tmp", prefix="virt-pack") >> + self.stagedir = os.path.join(self.tmpdir, self.vername) >> + self.files = [] >> + >> + def add_image_files(self): >> + cwd = os.getcwd() >> + img = self.image >> + self.files.append(os.path.basename(img.filename)) >> + try: >> + os.chdir(img.base) >> + for d in img.storage.keys(): >> + disk = img.storage[d] >> + if disk.use == disk.USE_SCRATCH: >> + if disk.size is None: >> + raise PackageException(_("Scratch disk %s does not have a size attribute") % disk.id) >> + else: >> + if not os.path.exists(disk.file): >> + raise PackageException(_("Disk file %s could not be found") % disk.id) >> + self.files.append(disk.file) >> + finally: >> + os.chdir(cwd) >> + >> > > > Is there any reason for this to still be here that I'm missing? My previous > comment was: > > >> Why change directories here? Seems like it could all be avoided if the >> above check is changed to: os.path.exists(os.path.join(img.base, disk.file)) >> > > > >> + def make_vmx_files(self): >> + img = virtinst.UnWare.Image(self.image) >> + files = img.make(self.image.base) >> + self.files.extend(files) >> + >> + def pack(self, outdir): >> + outfile = os.path.join(outdir, self.vername + ".tgz") >> + for f in set(self.files): >> + dir = os.path.join(self.stagedir, os.path.dirname(f)) >> + if not os.path.exists(dir): >> + os.makedirs(dir) >> + # cwd = os.getcwd() >> + os.symlink(os.path.join(self.image.base, f), >> + os.path.join(self.stagedir, f)) >> + print "Writing %s" % outfile >> + cmd = "tar chzv -C %s -f %s %s" % (self.tmpdir, >> + outfile, >> + os.path.basename(self.vername)) >> + util.system(cmd) >> + return outfile >> > > > I missed this above message first time around: might want to also wrap > "Writing %s" to make it translatable. > > > >> + >> +### Option parsing >> +def parse_args(): >> + parser = OptionParser() >> + parser.set_usage("%prog [options] image.xml") >> + >> + parser.add_option("-o", "--output", type="string", dest="output", >> + action="callback", callback=cli.check_before_store, >> + help=_("Directory in which packaged file will be put")) >> + parser.add_option("-d", "--debug", action="store_true", dest="debug", >> + help=_("Print debugging information")) >> + >> + (options,args) = parser.parse_args() >> + if len(args) < 1: >> + parser.error(_("You need to provide an image XML descriptor")) >> + options.image = args[0] >> + >> + return options >> + >> +def main(): >> + options = parse_args() >> + cli.setupLogging("virt-pack", options.debug) >> + image = virtinst.ImageParser.parse_file(os.path.abspath(options.image)) >> + if image.name is None or image.version is None: >> + print >> sys.stderr, _("The image descriptor must contain name and version") >> + valid = False >> + >> + if options.output is None: >> + options.output = os.path.join(image.base, "..") >> + >> + pkg = Package(image) >> + try: >> + pkg.add_image_files() >> + except PackageException, e: >> + print >> sys.stderr, _("Validation failed: %s"), e >> + return 1 >> + >> + try: >> + pkg.make_vmx_files() >> + pkg.pack(options.output) >> + except PackageException, e: >> + print >> sys.stderr, _("Packaging failed: %s") % e >> + return 1 >> + >> +if __name__ == "__main__": >> + main() >> + >> > > > Thanks, > Cole > -------------- next part -------------- A non-text attachment was scrubbed... Name: package.patch Type: text/x-patch Size: 15853 bytes Desc: not available URL: From jboggs at redhat.com Tue Jun 10 19:31:01 2008 From: jboggs at redhat.com (Joey Boggs) Date: Tue, 10 Jun 2008 15:31:01 -0400 Subject: [et-mgmt-tools] [PATCH] virt-inst Package an image for VMware distribution In-Reply-To: <484EC1BD.7010507@redhat.com> References: <484058D2.6030006@redhat.com> <48497639.8090108@redhat.com> <484D6391.5060800@redhat.com> <484EC1BD.7010507@redhat.com> Message-ID: <484ED675.5070608@redhat.com> Made more updates based on comments. Cole Robinson wrote: > Joey Boggs wrote: > >> Updated virt-pack and Unware.py per suggestions >> >> > > Comments inline: > > > >> diff -Naur virtinst--devel.orig/virtinst/UnWare.py virtinst--devel/virtinst/UnWare.py >> --- virtinst--devel.orig/virtinst/UnWare.py 1969-12-31 19:00:00.000000000 -0500 >> +++ virtinst--devel/virtinst/UnWare.py 2008-06-09 13:03:41.000000000 -0400 >> @@ -0,0 +1,309 @@ >> +# >> +# Processing of VMWare(tm) .vmx files >> +# >> +# Copyright 2007 Red Hat, Inc. >> +# David Lutterkort >> +# >> +# This program is free software; you can redistribute it and/or modify >> +# it under the terms of the GNU General Public License as published by >> +# the Free Software Foundation; either version 2 of the License, or >> +# (at your option) any later version. >> +# >> +# This program is distributed in the hope that it will be useful, >> +# but WITHOUT ANY WARRANTY; without even the implied warranty of >> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> +# GNU General Public License for more details. >> +# >> +# You should have received a copy of the GNU General Public License >> +# along with this program; if not, write to the Free Software >> +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, >> +# MA 02110-1301 USA. >> + >> +import time >> +import sys >> +import os >> + >> +import ImageParser >> +import util >> + >> +class Disk: >> + """A disk for a VMWare(tm) virtual machine""" >> + >> + MONOLITHIC_FLAT = "monolithicFlat" >> + TWO_GB_MAX_EXTENT_SPARSE = "twoGbMaxExtentSparse" >> + # This seems only to be usable if the vmdk header is embedded in the >> + # data file, not when the descriptor is in a separate text file. Use >> + # TWO_GB_MAX_EXTENT_SPARSE instead. >> + # VMWare's(tm) documentation of VMDK seriously sucks. A lot. >> + MONOLITHIC_SPARSE = "monolithicSparse" >> + >> + IDE_HEADS = 16 >> + IDE_SECTORS = 63 >> + >> + def __init__(self, descriptor, extent, size, dev, format): >> + """Create a new disk. DESCRIPTOR is the name of the VMDK descriptor >> + file. EXTENT is the name of the file holding the actual data. SIZE >> + is the filesize in bytes. DEV identifies the device, for IDE (the >> + only one supported right now) it should be $bus:$master. FORMAT is >> + the format of the underlying extent, one of the formats defined in >> + virtinst.ImageParser.Disk""" >> + self.cid = 0xffffffff >> + self.createType = Disk.MONOLITHIC_FLAT >> + self.descriptor = descriptor >> + self.extent = extent >> + self.size = size >> + self.dev = dev >> + self.format = format >> + >> + def make_extent(self, base): >> + """Write the descriptor file, and create the extent as a monolithic >> + sparse extent if it does not exist yet""" >> + f = os.path.join(base, self.extent) >> + print "Checking %s" % f >> > > > This print is still in place, any reason for that? My previous comment was: > > >> We shouldn't just straight 'print' from a library, even if only one app is using it. >> I suggest using logging.debug. >> > > > >> + if not os.path.exists(f): >> + util.system("qemu-img create -f vmdk %s %d" % (f, self.size/1024)) >> + self.createType = Disk.TWO_GB_MAX_EXTENT_SPARSE >> + else: >> + qemu = os.popen("qemu-img info %s" % f, "r") >> + for l in qemu: >> + (tag, val) = l.split(":") >> + if tag == "file format" and val.strip() == "vmdk": >> + self.createType = Disk.TWO_GB_MAX_EXTENT_SPARSE >> + qemu.close() >> + return self.extent >> + >> + def _VMDK_TEMPLATE(self): >> + >> + blocks = self.size/512 >> + if self.createType == Disk.MONOLITHIC_FLAT: >> + vmdk_extent_info= "RW %d FLAT \"%s\" 0\n" % (blocks, os.path.basename(self.extent)) >> + else: # Disk.MONOLITHIC_SPARSE >> + vmdk_extent_info= "RW %d SPARSE \"%s\"\n" % (blocks, os.path.basename(self.extent)) >> + >> + dict = { >> + "SELF_CID" : self.cid, >> + "CREATE_TYPE" : self.createType, >> + "IDE_SECTORS" : Disk.IDE_SECTORS, >> + "IDE_HEADS" : Disk.IDE_HEADS, >> + "IDE_BLOCKS" : blocks, >> + "IDE_CYLINDERS" : blocks/(Disk.IDE_SECTORS*Disk.IDE_HEADS), >> + "VMDK_EXTENT_INFO" : vmdk_extent_info, >> + } >> + >> + vmdk = """# Disk DescriptorFile >> +# Generated from virtinst >> +version=1 >> + >> +CID=%(SELF_CID)s >> +parentCID=ffffffff >> +createType="%(CREATE_TYPE)s" >> + >> +# Extent description >> +%(VMDK_EXTENT_INFO)s >> + >> +# Disk Data Base >> +ddb.virtualHWVersion = "4" >> +ddb.adapterType = "ide" >> +ddb.geometry.sectors = "%(IDE_SECTORS)s" >> +ddb.geometry.heads = "%(IDE_HEADS)s" >> +ddb.geometry.cylinders = "%(IDE_CYLINDERS)s" >> +""" >> + vmdk = vmdk % dict >> + return vmdk >> > > > Not that there are any adverse effects with the current code, but > 'dict' is actually used in python referring to the actual > dictionary type. So it might be good to use a different variable > name here (and there is an example below as well.) > > > >> + >> + >> + def to_vmx(self): >> + """Return the fragment for the VMX file for this disk""" >> + >> + vmx = "" >> + dict = { >> + "dev" : self.dev, >> + "disk_filename" : self.descriptor >> + } >> + if self.format == ImageParser.Disk.FORMAT_ISO: >> + vmx = _VMX_ISO_TEMPLATE % dict >> + else: # FORMAT_RAW >> + vmx = _VMX_IDE_TEMPLATE % dict >> + return vmx >> + >> +class Image: >> + """Represent an image for generation of a VMWare(tm) description""" >> + >> + def __init__(self, image = None): >> + if image is not None: >> + self._init_from_image(image) >> + >> + def _init_from_image(self, image): >> + domain = image.domain >> + boot = domain.boots[0] >> + >> + self.base = image.base >> + self.name = image.name >> + self.descr = image.descr >> + self.label = image.label >> + self.vcpu = domain.vcpu >> + self.memory = domain.memory >> + self.interface = domain.interface >> + >> + self.disks = [] >> + for d in boot.drives: >> + disk = d.disk >> + descriptor = sub_ext(disk.file, ".vmdk") >> + if disk.size is None: >> + f = os.path.join(image.base, disk.file) >> + size = os.stat(f).st_size >> + else: >> + size = long(disk.size) * 1024L * 1024L >> + ide_count = len(self.disks) >> + dev = "%d:%d" % (ide_count / 2, ide_count % 2) >> + self.disks.append(Disk(descriptor, disk.file, size, dev, >> + disk.format)) >> + >> + def make(self, base): >> + """Write the descriptor file and all the disk descriptors""" >> + files = [] >> + out = open(os.path.join(self.base, self.name + ".vmx"), "w") >> + out.write(self.to_vmx()) >> + out.close() >> + files.append(self.name + ".vmx") >> + >> + for d in self.disks: >> + f = d.make_extent(self.base) >> + files.append(f) >> + out = open(os.path.join(base, d.descriptor), "w") >> + out.write(d._VMDK_TEMPLATE()) >> + out.close() >> + files.append(d.descriptor) >> + return files >> + >> + def to_vmx(self): >> + """Return the VMX description of this image""" >> + # Strip blank spaces and EOL to prevent syntax errors in vmx file >> + self.descr = self.descr.strip() >> + self.descr = self.descr.replace("\n","|") >> + >> + dict = { >> + "now": time.strftime("%Y-%m-%dT%H:%M:%S %Z", time.localtime()), >> + "progname": os.path.basename(sys.argv[0]), >> + "/image/name": self.name, >> + "/image/description": self.descr or "None", >> + "/image/label": self.label or self.name, >> + "/image/devices/vcpu" : self.vcpu, >> + "/image/devices/memory": long(self.memory)/1024 >> + } >> + >> + vmx = _VMX_MAIN_TEMPLATE % dict >> + if self.interface: >> + vmx += _VMX_ETHER_TEMPLATE >> + >> + for d in self.disks: >> + vmx += d.to_vmx() >> + >> + return vmx >> + >> +def sub_ext(filename, ext): >> + return os.path.splitext(filename)[0] + ext >> + >> +_VMX_MAIN_TEMPLATE = """ >> +#!/usr/bin/vmplayer >> + >> +# Generated %(now)s by %(progname)s >> +# http://virt-manager.et.redhat.com/ >> + >> +# This is a Workstation 5 or 5.5 config file >> +# It can be used with Player >> +config.version = "8" >> +virtualHW.version = "4" >> + >> +# Selected operating system for your virtual machine >> +guestOS = "other" >> + >> +# displayName is your own name for the virtual machine >> +displayName = "%(/image/name)s" >> + >> +# These fields are free text description fields >> +annotation = "%(/image/description)s" >> +guestinfo.vmware.product.long = "%(/image/label)s" >> +guestinfo.vmware.product.url = "http://virt-manager.et.redhat.com/" >> +guestinfo.vmware.product.class = "virtual machine" >> + >> +# Number of virtual CPUs. Your virtual machine will not >> +# work if this number is higher than the number of your physical CPUs >> +numvcpus = "%(/image/devices/vcpu)s" >> + >> +# Memory size and other memory settings >> +memsize = "%(/image/devices/memory)d" >> +MemAllowAutoScaleDown = "FALSE" >> +MemTrimRate = "-1" >> + >> +# Unique ID for the virtual machine will be created >> +uuid.action = "create" >> + >> +## For appliances where tools are installed already, this should really >> +## be false, but we don't have that ionfo in the metadata >> +# Remind to install VMware Tools >> +# This setting has no effect in VMware Player >> +tools.remindInstall = "TRUE" >> + >> +# Startup hints interfers with automatic startup of a virtual machine >> +# This setting has no effect in VMware Player >> +hints.hideAll = "TRUE" >> + >> +# Enable time synchronization between computer >> +# and virtual machine >> +tools.syncTime = "TRUE" >> + >> +# First serial port, physical COM1 is not available >> +serial0.present = "FALSE" >> + >> +# Optional second serial port, physical COM2 is not available >> +serial1.present = "FALSE" >> + >> +# First parallell port, physical LPT1 is not available >> +parallel0.present = "FALSE" >> + >> +# Logging >> +# This config activates logging, and keeps last log >> +logging = "TRUE" >> +log.fileName = "%(/image/name)s.log" >> +log.append = "TRUE" >> +log.keepOld = "3" >> + >> +# These settings decides interaction between your >> +# computer and the virtual machine >> +isolation.tools.hgfs.disable = "FALSE" >> +isolation.tools.dnd.disable = "FALSE" >> +isolation.tools.copy.enable = "TRUE" >> +isolation.tools.paste.enabled = "TRUE" >> + >> +# Settings for physical floppy drive >> +floppy0.present = "FALSE" >> +""" >> + >> +_VMX_ETHER_TEMPLATE = """ >> +## if /image/devices/interface is present: >> +# First network interface card >> +ethernet0.present = "TRUE" >> +ethernet0.connectionType = "nat" >> +ethernet0.addressType = "generated" >> +ethernet0.generatedAddressOffset = "0" >> +ethernet0.autoDetect = "TRUE" >> +""" >> + >> +_VMX_ISO_TEMPLATE = """ >> +# CDROM drive >> +ide%(dev)s.present = "TRUE" >> +ide%(dev)s.deviceType = "cdrom-raw" >> +ide%(dev)s.startConnected = "TRUE" >> +ide%(dev)s.fileName = "%(disk_filename)s" >> +ide%(dev)s.autodetect = "TRUE" >> +""" >> + >> +_VMX_IDE_TEMPLATE = """ >> +# IDE disk >> +ide%(dev)s.present = "TRUE" >> +ide%(dev)s.fileName = "%(disk_filename)s" >> +ide%(dev)s.mode = "persistent" >> +ide%(dev)s.startConnected = "TRUE" >> +ide%(dev)s.writeThrough = "TRUE" >> +""" >> diff -Naur virtinst--devel.orig/virt-pack virtinst--devel/virt-pack >> --- virtinst--devel.orig/virt-pack 1969-12-31 19:00:00.000000000 -0500 >> +++ virtinst--devel/virt-pack 2008-06-09 13:03:30.000000000 -0400 >> @@ -0,0 +1,146 @@ >> +#!/usr/bin/python -tt >> +# >> +# Package and unpackage images for distribution >> +# >> +# Copyright 2007 Red Hat, Inc. >> +# David Lutterkort >> +# >> +# This program is free software; you can redistribute it and/or modify >> +# it under the terms of the GNU General Public License as published by >> +# the Free Software Foundation; either version 2 of the License, or >> +# (at your option) any later version. >> +# >> +# This program is distributed in the hope that it will be useful, >> +# but WITHOUT ANY WARRANTY; without even the implied warranty of >> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> +# GNU General Public License for more details. >> +# >> +# You should have received a copy of the GNU General Public License >> +# along with this program; if not, write to the Free Software >> +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, >> +# MA 02110-1301 USA. >> + >> +import os, sys, string >> +from optparse import OptionParser, OptionValueError >> +import subprocess >> +import logging >> +import libxml2 >> +import urlgrabber.progress as progress >> + >> +import virtinst >> +import virtinst.ImageParser >> +import virtinst.CapabilitiesParser >> +import virtinst.cli as cli >> +import virtinst.util as util >> +import virtinst.UnWare >> + >> +import tempfile >> + >> +import gettext >> +import locale >> + >> +locale.setlocale(locale.LC_ALL, '') >> +gettext.bindtextdomain(virtinst.gettext_app, virtinst.gettext_dir) >> +gettext.install(virtinst.gettext_app, virtinst.gettext_dir) >> + >> +class PackageException(Exception): >> + def __init__(self, msg): >> + Exception.__init__(self, msg) >> + >> +class Package: >> + >> + def __init__(self, image): >> + self.image = image >> + if image.name is None or image.version is None: >> + raise PackageException( >> + _("The image name and version must be present")) >> + self.vername = "%s-%s" % (image.name, image.version) >> + self.tmpdir = tempfile.mkdtemp(dir="/var/tmp", prefix="virt-pack") >> + self.stagedir = os.path.join(self.tmpdir, self.vername) >> + self.files = [] >> + >> + def add_image_files(self): >> + cwd = os.getcwd() >> + img = self.image >> + self.files.append(os.path.basename(img.filename)) >> + try: >> + os.chdir(img.base) >> + for d in img.storage.keys(): >> + disk = img.storage[d] >> + if disk.use == disk.USE_SCRATCH: >> + if disk.size is None: >> + raise PackageException(_("Scratch disk %s does not have a size attribute") % disk.id) >> + else: >> + if not os.path.exists(disk.file): >> + raise PackageException(_("Disk file %s could not be found") % disk.id) >> + self.files.append(disk.file) >> + finally: >> + os.chdir(cwd) >> + >> > > > Is there any reason for this to still be here that I'm missing? My previous > comment was: > > >> Why change directories here? Seems like it could all be avoided if the >> above check is changed to: os.path.exists(os.path.join(img.base, disk.file)) >> > > > >> + def make_vmx_files(self): >> + img = virtinst.UnWare.Image(self.image) >> + files = img.make(self.image.base) >> + self.files.extend(files) >> + >> + def pack(self, outdir): >> + outfile = os.path.join(outdir, self.vername + ".tgz") >> + for f in set(self.files): >> + dir = os.path.join(self.stagedir, os.path.dirname(f)) >> + if not os.path.exists(dir): >> + os.makedirs(dir) >> + # cwd = os.getcwd() >> + os.symlink(os.path.join(self.image.base, f), >> + os.path.join(self.stagedir, f)) >> + print "Writing %s" % outfile >> + cmd = "tar chzv -C %s -f %s %s" % (self.tmpdir, >> + outfile, >> + os.path.basename(self.vername)) >> + util.system(cmd) >> + return outfile >> > > > I missed this above message first time around: might want to also wrap > "Writing %s" to make it translatable. > > > >> + >> +### Option parsing >> +def parse_args(): >> + parser = OptionParser() >> + parser.set_usage("%prog [options] image.xml") >> + >> + parser.add_option("-o", "--output", type="string", dest="output", >> + action="callback", callback=cli.check_before_store, >> + help=_("Directory in which packaged file will be put")) >> + parser.add_option("-d", "--debug", action="store_true", dest="debug", >> + help=_("Print debugging information")) >> + >> + (options,args) = parser.parse_args() >> + if len(args) < 1: >> + parser.error(_("You need to provide an image XML descriptor")) >> + options.image = args[0] >> + >> + return options >> + >> +def main(): >> + options = parse_args() >> + cli.setupLogging("virt-pack", options.debug) >> + image = virtinst.ImageParser.parse_file(os.path.abspath(options.image)) >> + if image.name is None or image.version is None: >> + print >> sys.stderr, _("The image descriptor must contain name and version") >> + valid = False >> + >> + if options.output is None: >> + options.output = os.path.join(image.base, "..") >> + >> + pkg = Package(image) >> + try: >> + pkg.add_image_files() >> + except PackageException, e: >> + print >> sys.stderr, _("Validation failed: %s"), e >> + return 1 >> + >> + try: >> + pkg.make_vmx_files() >> + pkg.pack(options.output) >> + except PackageException, e: >> + print >> sys.stderr, _("Packaging failed: %s") % e >> + return 1 >> + >> +if __name__ == "__main__": >> + main() >> + >> > > > Thanks, > Cole > -------------- next part -------------- A non-text attachment was scrubbed... Name: package.patch Type: text/x-patch Size: 15779 bytes Desc: not available URL: From jboyer at liquidnet.com Tue Jun 10 20:16:58 2008 From: jboyer at liquidnet.com (Joseph Boyer Jr.) Date: Tue, 10 Jun 2008 16:16:58 -0400 Subject: [et-mgmt-tools] How-to: write custom authorization code Message-ID: <26AA63832ED7774DBFB9FFB39B337C0024472A9B@nj0cech03.lnholdings.com> I would like to write an update to the authorization code where a user only has access to add a system and run cobbler sync via the webGUI. I have a requirement where distros, repos, and profiles are created and maintained by engineering (full access) and support (read/write to systems, read-only everything else) will be performing install. Any pointers where to start would be most appreciated. Thanks! joe Joseph Boyer Jr Enterprise Technology Services Liquidnet Holdings, Inc. Joseph.Boyer at liquidnet.com T +1 646.660.8352 C +1 646.284.8394 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdehaan at redhat.com Tue Jun 10 20:42:15 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Tue, 10 Jun 2008 16:42:15 -0400 Subject: [et-mgmt-tools] How-to: write custom authorization code In-Reply-To: <26AA63832ED7774DBFB9FFB39B337C0024472A9B@nj0cech03.lnholdings.com> References: <26AA63832ED7774DBFB9FFB39B337C0024472A9B@nj0cech03.lnholdings.com> Message-ID: <484EE727.6050208@redhat.com> Joseph Boyer Jr. wrote: > > I would like to write an update to the authorization code where a user > only has access to add a system and run cobbler sync via the webGUI. > That should be doable. The rest of the links in the WebUI (presently) would be still visible but would generate "access denied" messages when clicked upon. In other words, you can still read the other data, but in most places you get a warning that you can't edit them and the button to save is missing. This should be ok. (In the future, I want to create a simple page that allows the user only access to do certain things, and to present them less fields. Details TBD and I'll ask the list as that is getting fleshed out -- I'm various non-web RFEs first.) > > > I have a requirement where distros, repos, and profiles are created > and maintained by engineering (full access) and support (read/write to > systems, read-only everything else) will be performing install. > > > > Any pointers where to start would be most appreciated. > This shouldn't be too hard. modules/authz_ownership.py is a system that denies operations based on the username of the user and whether he is or is not in certain "groups" or is otherwise explicitly listed anywhere you see --owner in the command line or Web app. you want to create a new module "authz_mypolicy.py" based on this, but modify the "authorize()" function to do your bidding. You can see it returns 1 (let me in) or 0 (don't let me in) in certain cases. You want to modify this, and check to see if they are in the admin group to allow everything (return 1), and if they are a user, only permit certain resources such as "new_system", and "sync". You will see the admin logic is already there, so in that case you don't have too much to change. Basically instead of checking for the ownership on the object if the user is not an admin, you want to skip that check and then make additional checks on the name of the operation they want to perform -- "new_system", "save_system", "sync", etc The exact names of all the methods gating access are listed in remote.py This is all done at the authorization layer, your authentication layer is seperate from this and does not need to be modified. Once you have the authz_mypolicy.py installed in /usr/lib/python2.X/site-packages/cobbler/modules, you just need to change the authz option in /etc/cobbler/modules.conf to point to your new policy. Let me know if I can be of any further help and if the above makes sense. You probably want to join #cobbler for development discussions if you haven't already. --Michael > > > > Thanks! > > joe > > > > *Joseph Boyer Jr* > *Enterprise Technology Services** ** > **Liquidnet Holdings, Inc.* > *_Joseph.Boyer_**@liquidnet.com * > *T** * +1 646.660.8352 > *C ** *+1 646.284.8394 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From jboyer at liquidnet.com Tue Jun 10 21:31:41 2008 From: jboyer at liquidnet.com (Joseph Boyer Jr.) Date: Tue, 10 Jun 2008 17:31:41 -0400 Subject: [et-mgmt-tools] How-to: write custom authorization code In-Reply-To: <484EE727.6050208@redhat.com> References: <26AA63832ED7774DBFB9FFB39B337C0024472A9B@nj0cech03.lnholdings.com> <484EE727.6050208@redhat.com> Message-ID: <26AA63832ED7774DBFB9FFB39B337C002450150F@nj0cech03.lnholdings.com> Thanks for the info. I will pass the code along once I get something working. --joe Joseph Boyer Jr Enterprise Technology Services Liquidnet Holdings, Inc. Joseph.Boyer at liquidnet.com T +1 646.660.8352 C +1 646.284.8394 -----Original Message----- From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Michael DeHaan Sent: Tuesday, June 10, 2008 4:42 PM To: Fedora/Linux Management Tools Subject: Re: [et-mgmt-tools] How-to: write custom authorization code Joseph Boyer Jr. wrote: > > I would like to write an update to the authorization code where a user > only has access to add a system and run cobbler sync via the webGUI. > That should be doable. The rest of the links in the WebUI (presently) would be still visible but would generate "access denied" messages when clicked upon. In other words, you can still read the other data, but in most places you get a warning that you can't edit them and the button to save is missing. This should be ok. (In the future, I want to create a simple page that allows the user only access to do certain things, and to present them less fields. Details TBD and I'll ask the list as that is getting fleshed out -- I'm various non-web RFEs first.) > > > I have a requirement where distros, repos, and profiles are created > and maintained by engineering (full access) and support (read/write to > systems, read-only everything else) will be performing install. > > > > Any pointers where to start would be most appreciated. > This shouldn't be too hard. modules/authz_ownership.py is a system that denies operations based on the username of the user and whether he is or is not in certain "groups" or is otherwise explicitly listed anywhere you see --owner in the command line or Web app. you want to create a new module "authz_mypolicy.py" based on this, but modify the "authorize()" function to do your bidding. You can see it returns 1 (let me in) or 0 (don't let me in) in certain cases. You want to modify this, and check to see if they are in the admin group to allow everything (return 1), and if they are a user, only permit certain resources such as "new_system", and "sync". You will see the admin logic is already there, so in that case you don't have too much to change. Basically instead of checking for the ownership on the object if the user is not an admin, you want to skip that check and then make additional checks on the name of the operation they want to perform -- "new_system", "save_system", "sync", etc The exact names of all the methods gating access are listed in remote.py This is all done at the authorization layer, your authentication layer is seperate from this and does not need to be modified. Once you have the authz_mypolicy.py installed in /usr/lib/python2.X/site-packages/cobbler/modules, you just need to change the authz option in /etc/cobbler/modules.conf to point to your new policy. Let me know if I can be of any further help and if the above makes sense. You probably want to join #cobbler for development discussions if you haven't already. --Michael > > > > Thanks! > > joe > > > > *Joseph Boyer Jr* > *Enterprise Technology Services** ** > **Liquidnet Holdings, Inc.* > *_Joseph.Boyer_**@liquidnet.com * > *T** * +1 646.660.8352 > *C ** *+1 646.284.8394 > > > > ------------------------------------------------------------------------ > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools at redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools From adrian.revill at shazamteam.com Wed Jun 11 09:03:34 2008 From: adrian.revill at shazamteam.com (Adrian Revill) Date: Wed, 11 Jun 2008 10:03:34 +0100 Subject: [et-mgmt-tools] cobbler sync error Message-ID: <484F94E6.4020709@shazamteam.com> I am getting an error in the cobbler sync (v1.0.1-2) i also get the same error at the end of an import, any ideas how to find the cause # cobbler sync exceptions.AttributeError 'module' object has no attribute 'makedir' File "/usr/lib/python2.4/site-packages/cobbler/cobbler.py", line 65, in main return BootCLI().run(sys.argv) File "/usr/lib/python2.4/site-packages/cobbler/cobbler.py", line 44, in run return self.loader.run(args) File "/usr/lib/python2.4/site-packages/cobbler/commands.py", line 69, in run return fn.run() File "/usr/lib/python2.4/site-packages/cobbler/modules/cli_misc.py", line 211, in run return self.api.sync() File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 327, in sync return sync.run() File "/usr/lib/python2.4/site-packages/cobbler/action_sync.py", line 89, in run self.clean_trees() File "/usr/lib/python2.4/site-packages/cobbler/action_sync.py", line 135, in clean_trees utils.makedir(pxelinux_dir) From mdehaan at redhat.com Wed Jun 11 14:32:12 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Wed, 11 Jun 2008 10:32:12 -0400 Subject: [et-mgmt-tools] cobbler sync error In-Reply-To: <484F94E6.4020709@shazamteam.com> References: <484F94E6.4020709@shazamteam.com> Message-ID: <484FE1EC.40806@redhat.com> Adrian Revill wrote: > I am getting an error in the cobbler sync (v1.0.1-2) i also get the > same error at the end of an import, any ideas how to find the cause > > # cobbler sync > exceptions.AttributeError 'module' object has no attribute 'makedir' > File "/usr/lib/python2.4/site-packages/cobbler/cobbler.py", line 65, > in main > return BootCLI().run(sys.argv) > File "/usr/lib/python2.4/site-packages/cobbler/cobbler.py", line 44, > in run > return self.loader.run(args) > File "/usr/lib/python2.4/site-packages/cobbler/commands.py", line > 69, in run > return fn.run() > File "/usr/lib/python2.4/site-packages/cobbler/modules/cli_misc.py", > line 211, in run > return self.api.sync() > File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 327, in > sync > return sync.run() > File "/usr/lib/python2.4/site-packages/cobbler/action_sync.py", line > 89, in run > self.clean_trees() > File "/usr/lib/python2.4/site-packages/cobbler/action_sync.py", line > 135, in clean_trees > utils.makedir(pxelinux_dir) > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools This is fixed for 1.0.2, which is already pushed out. https://fedorahosted.org/cobbler/ticket/170 From jensampol at yahoo.de Wed Jun 11 15:07:32 2008 From: jensampol at yahoo.de (Jens Ahrens) Date: Wed, 11 Jun 2008 15:07:32 +0000 (GMT) Subject: [et-mgmt-tools] Where is kickstarts_sys? Message-ID: <183638.69310.qm@web25508.mail.ukl.yahoo.com> Hi everybody, I just upgraded to cobbler 1.0.2-1 and now I'm mising the location where the kickstart-file used to be (kickstarts_sys). Doing a cobbler sync doesn't create any output anymore. Does anyone have a clue? Cheers, Jens __________________________________________________________ Gesendet von Yahoo! Mail. Dem pfiffigeren Posteingang. http://de.overview.mail.yahoo.com From tom at ng23.net Wed Jun 11 15:15:14 2008 From: tom at ng23.net (Tom Brown) Date: Wed, 11 Jun 2008 16:15:14 +0100 Subject: [et-mgmt-tools] Where is kickstarts_sys? In-Reply-To: <183638.69310.qm@web25508.mail.ukl.yahoo.com> References: <183638.69310.qm@web25508.mail.ukl.yahoo.com> Message-ID: <484FEC02.3030407@ng23.net> > Hi everybody, > > I just upgraded to cobbler 1.0.2-1 and now I'm mising the location where the > kickstart-file used to be (kickstarts_sys). Doing a cobbler sync doesn't create any output anymore. Does anyone have a clue? > they are now generated on the fly - you can hit http://lala.com/cblr/svc/op/ks/system/ to look at them From lhaig at haigmail.com Thu Jun 12 13:03:36 2008 From: lhaig at haigmail.com (lhaig-haigmail.com) Date: Thu, 12 Jun 2008 09:03:36 -0400 Subject: [et-mgmt-tools] Problem with "hang" on AMD chip Message-ID: <0ed58e4d5cc916350a4deaff38f252cb@haigmail.com> Hi, I just tried using kvm on my Dell AMD64 laptop and virt-manager. I can create a vm quite fine and I can start it. Booting of an iso file the vm boots and starts set-up but then hangs the whole machine. no keyboard mouse access. You can still ping the host but not connect via ssh. Other machines running the same os "ForesightLinux" do not have this problem. How can I start debugging this? Thanks Lance From adrian.revill at shazamteam.com Thu Jun 12 14:30:22 2008 From: adrian.revill at shazamteam.com (Adrian Revill) Date: Thu, 12 Jun 2008 15:30:22 +0100 Subject: [et-mgmt-tools] Cobbler reposync cron script Message-ID: <485132FE.3000307@shazamteam.com> Just in case anyone needs a script to run cobbler reposync from cron, here is one i have written. It runs each repo in turn, and gives each a number of tries (10) to over come problems with failing syncs. #!/bin/bash TRIES=10 # number of times to try and run reposync LOGFILE="/var/log/cobbler/cobbler_reposync.log" function running { PID=$(ps ax| awk '/cobbler reposync/ && !/awk/ {print ($1)}') if [ -z $PID ] then log "cobbler reposync is not running" return 1 fi log "cobbler reposync is running PID=$PID" return 0 } function log { logger -t "COBBLER_REPOSYNC" -- $1 } function run { try=1 ret=1 while [ $try -le $TRIES ] do running ok=$? if [ $ok -eq 0 ] then log "Already running, aborting" break fi log "Attempt $try for $1" cobbler reposync --only=$1 2>&1 >> $LOGFILE ret=$? if [ $ret -eq 0 ] then break fi log "Attempt $try failed" try=$[ $try + 1 ] done if [ $ret -eq 0 ] then log "Compleated $1" else log "Too many trys or already running, giving up on $1" fi } log "Starting" mv $LOGFILE $LOGFILE.1 for name in $(awk '/name:/ {print($2)}' /var/lib/cobbler/repos) do run $name done From mdehaan at redhat.com Thu Jun 12 14:46:05 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Thu, 12 Jun 2008 10:46:05 -0400 Subject: [et-mgmt-tools] Cobbler reposync cron script In-Reply-To: <485132FE.3000307@shazamteam.com> References: <485132FE.3000307@shazamteam.com> Message-ID: <485136AD.2070707@redhat.com> Adrian Revill wrote: > Just in case anyone needs a script to run cobbler reposync from cron, > here is one i have written. It runs each repo in turn, and gives each > a number of tries (10) to over come problems with failing syncs. > > #!/bin/bash > > TRIES=10 # number of times to try and run reposync > LOGFILE="/var/log/cobbler/cobbler_reposync.log" > > function running { > PID=$(ps ax| awk '/cobbler reposync/ && !/awk/ {print ($1)}') > if [ -z $PID ] > then > log "cobbler reposync is not running" > return 1 > fi > log "cobbler reposync is running PID=$PID" > return 0 > } > > function log { > logger -t "COBBLER_REPOSYNC" -- $1 > } > > function run { > try=1 > ret=1 > while [ $try -le $TRIES ] > do > running > ok=$? > if [ $ok -eq 0 ] > then > log "Already running, aborting" > break > fi > log "Attempt $try for $1" > cobbler reposync --only=$1 2>&1 >> $LOGFILE > ret=$? > if [ $ret -eq 0 ] > then > break > fi > log "Attempt $try failed" > try=$[ $try + 1 ] > done > if [ $ret -eq 0 ] > then > log "Compleated $1" > else > log "Too many trys or already running, giving up on $1" > > fi > } > > log "Starting" > mv $LOGFILE $LOGFILE.1 > > for name in $(awk '/name:/ {print($2)}' /var/lib/cobbler/repos) > do > run $name > done > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools Nice! Do you mind if I put this in a 'contrib' directory in cobbler's version control so other people can find it later? We can mention this on the Wiki too. One small change I'd make is to make the last awk line run 'cobbler repo list' instead of grepping the file, that way it works regardless of the storage backend -- though everyone pretty much uses the stock one. --Michael From robin-lists at robinbowes.com Thu Jun 12 15:24:18 2008 From: robin-lists at robinbowes.com (Robin Bowes) Date: Thu, 12 Jun 2008 16:24:18 +0100 Subject: [et-mgmt-tools] Re: Cobbler reposync cron script In-Reply-To: <485136AD.2070707@redhat.com> References: <485132FE.3000307@shazamteam.com> <485136AD.2070707@redhat.com> Message-ID: Michael DeHaan wrote: > Adrian Revill wrote: >> for name in $(awk '/name:/ {print($2)}' /var/lib/cobbler/repos) >> do >> run $name >> done > > One small change I'd make is to make the last awk line run 'cobbler repo > list' instead of grepping the file, that way > it works regardless of the storage backend -- though everyone pretty > much uses the stock one. As I always say, if it looks too complicated, there's probably a better way to do it: for name in `cobbler repo list` do run $name done R. From ssklar at stanford.edu Thu Jun 12 15:38:42 2008 From: ssklar at stanford.edu (Sandor W. Sklar) Date: Thu, 12 Jun 2008 08:38:42 -0700 Subject: [et-mgmt-tools] Re: Cobbler reposync cron script In-Reply-To: References: <485132FE.3000307@shazamteam.com> <485136AD.2070707@redhat.com> Message-ID: On Jun 12, 2008, at 8:24 AM, Robin Bowes wrote: > Michael DeHaan wrote: >> Adrian Revill wrote: >>> for name in $(awk '/name:/ {print($2)}' /var/lib/cobbler/repos) >>> do >>> run $name >>> done >> One small change I'd make is to make the last awk line run 'cobbler >> repo list' instead of grepping the file, that way >> it works regardless of the storage backend -- though everyone >> pretty much uses the stock one. > > As I always say, if it looks too complicated, there's probably a > better way to do it: > > for name in `cobbler repo list` > do > run $name > done ... and I'm not sure why: cobbler reposync > /dev/null ... isn't sufficient. Is there an advantage to doing the repos one at a time? I've got the above. If everything works, I get no email. If there is a problem, it gets sent to stderr, so I get email. -s- From hyclak at math.ohiou.edu Thu Jun 12 15:43:47 2008 From: hyclak at math.ohiou.edu (Matt Hyclak) Date: Thu, 12 Jun 2008 11:43:47 -0400 Subject: [et-mgmt-tools] Re: Cobbler reposync cron script In-Reply-To: References: <485132FE.3000307@shazamteam.com> <485136AD.2070707@redhat.com> Message-ID: <20080612154347.GE28707@math.ohiou.edu> On Thu, Jun 12, 2008 at 08:38:42AM -0700, Sandor W. Sklar enlightened us: > On Jun 12, 2008, at 8:24 AM, Robin Bowes wrote: > > >Michael DeHaan wrote: > >>Adrian Revill wrote: > >>>for name in $(awk '/name:/ {print($2)}' /var/lib/cobbler/repos) > >>>do > >>> run $name > >>>done > >>One small change I'd make is to make the last awk line run 'cobbler > >>repo list' instead of grepping the file, that way > >>it works regardless of the storage backend -- though everyone > >>pretty much uses the stock one. > > > >As I always say, if it looks too complicated, there's probably a > >better way to do it: > > > >for name in `cobbler repo list` > >do > > run $name > >done > > > ... and I'm not sure why: > > cobbler reposync > /dev/null > > ... isn't sufficient. Is there an advantage to doing the repos one at > a time? I've got the above. If everything works, I get no email. If > there is a problem, it gets sent to stderr, so I get email. > cobbler stops processing the remaining repos if it hits an error in one, so doing them one at a time allows the others to complete. Matt -- Matt Hyclak Department of Mathematics Department of Social Work Ohio University (740) 593-1263 From mdehaan at redhat.com Thu Jun 12 15:53:20 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Thu, 12 Jun 2008 11:53:20 -0400 Subject: [et-mgmt-tools] Re: Cobbler reposync cron script In-Reply-To: <20080612154347.GE28707@math.ohiou.edu> References: <485132FE.3000307@shazamteam.com> <485136AD.2070707@redhat.com> <20080612154347.GE28707@math.ohiou.edu> Message-ID: <48514670.5090502@redhat.com> Matt Hyclak wrote: > On Thu, Jun 12, 2008 at 08:38:42AM -0700, Sandor W. Sklar enlightened us: > >> On Jun 12, 2008, at 8:24 AM, Robin Bowes wrote: >> >> >>> Michael DeHaan wrote: >>> >>>> Adrian Revill wrote: >>>> >>>>> for name in $(awk '/name:/ {print($2)}' /var/lib/cobbler/repos) >>>>> do >>>>> run $name >>>>> done >>>>> >>>> One small change I'd make is to make the last awk line run 'cobbler >>>> repo list' instead of grepping the file, that way >>>> it works regardless of the storage backend -- though everyone >>>> pretty much uses the stock one. >>>> >>> As I always say, if it looks too complicated, there's probably a >>> better way to do it: >>> >>> for name in `cobbler repo list` >>> do >>> run $name >>> done >>> >> ... and I'm not sure why: >> >> cobbler reposync > /dev/null >> >> ... isn't sufficient. Is there an advantage to doing the repos one at >> a time? I've got the above. If everything works, I get no email. If >> there is a problem, it gets sent to stderr, so I get email. >> >> > > cobbler stops processing the remaining repos if it hits an error in one, so > doing them one at a time allows the others to complete. > That's something we can do in the code later, no doubt. Until then, this does the job. The great thing is it doesn't really matter if it's Python or shell as long as it works :) I'll see about adding a --retries to reposync in the future. I believe there is already an RFE for a flag to skip the ones that fail without blocking the rest. > Matt > > From ssklar at stanford.edu Thu Jun 12 15:51:51 2008 From: ssklar at stanford.edu (Sandor W. Sklar) Date: Thu, 12 Jun 2008 08:51:51 -0700 Subject: [et-mgmt-tools] Re: Cobbler reposync cron script In-Reply-To: <20080612154347.GE28707@math.ohiou.edu> References: <485132FE.3000307@shazamteam.com> <485136AD.2070707@redhat.com> <20080612154347.GE28707@math.ohiou.edu> Message-ID: <23863FB8-F463-40CF-9932-463948E57E8F@stanford.edu> On Jun 12, 2008, at 8:43 AM, Matt Hyclak wrote: > On Thu, Jun 12, 2008 at 08:38:42AM -0700, Sandor W. Sklar > enlightened us: >> >> ... and I'm not sure why: >> >> cobbler reposync > /dev/null >> >> ... isn't sufficient. Is there an advantage to doing the repos one >> at >> a time? I've got the above. If everything works, I get no email. >> If >> there is a problem, it gets sent to stderr, so I get email. >> > > cobbler stops processing the remaining repos if it hits an error in > one, so > doing them one at a time allows the others to complete. Ah, cool, I didn't realize that. Now it makes sense! Thanks, -s- From dmourati at gmail.com Thu Jun 12 17:03:39 2008 From: dmourati at gmail.com (Demetri Mouratis) Date: Thu, 12 Jun 2008 10:03:39 -0700 Subject: [et-mgmt-tools] Way to Disable createrepo After cobbler reposync Message-ID: <3cc2cbc40806121003m62ffb5d4t1d3f70b8e0038297@mail.gmail.com> I'm finding that CentOS 4 running cobbler reposync against a CentOS 5 repo is causing problems with the repodata. There has been a change in the format of the repo structure between 4/5. Is there a way I can use cobbler reposync under Centos 4 (creatrepo 0.4.3) while preserving the repodata from the upstream? For more info, please see: http://www.nabble.com/CentOS-4-Cobbler-Server-Hosting-CentOS-5-Repository-td17568366.html Thanks. -D From mdehaan at redhat.com Thu Jun 12 17:14:48 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Thu, 12 Jun 2008 13:14:48 -0400 Subject: [et-mgmt-tools] Way to Disable createrepo After cobbler reposync In-Reply-To: <3cc2cbc40806121003m62ffb5d4t1d3f70b8e0038297@mail.gmail.com> References: <3cc2cbc40806121003m62ffb5d4t1d3f70b8e0038297@mail.gmail.com> Message-ID: <48515988.3020304@redhat.com> Demetri Mouratis wrote: > I'm finding that CentOS 4 running cobbler reposync against a CentOS 5 > repo is causing problems with the repodata. There has been a change > in the format of the repo structure between 4/5. Is there a way I can > use cobbler reposync under Centos 4 (creatrepo 0.4.3) while preserving > the repodata from the upstream? > > For more info, please see: > > http://www.nabble.com/CentOS-4-Cobbler-Server-Hosting-CentOS-5-Repository-td17568366.html > > Thanks. > > -D > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > It sounds like you are expressing a problem with yum-utils's createrepo from EL4 not working against EL 5 repos. While this problem is new to me, you should probably run from an EL-5 server, that has a createrepo that can grok both. In either case, it's a problem with the createrepo program and not something Cobbler is really involved with. It may be solved by a simple upgrade of the package. --Michael From mdehaan at redhat.com Thu Jun 12 17:18:47 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Thu, 12 Jun 2008 13:18:47 -0400 Subject: [et-mgmt-tools] Way to Disable createrepo After cobbler reposync In-Reply-To: <48515988.3020304@redhat.com> References: <3cc2cbc40806121003m62ffb5d4t1d3f70b8e0038297@mail.gmail.com> <48515988.3020304@redhat.com> Message-ID: <48515A77.8090406@redhat.com> Michael DeHaan wrote: > Demetri Mouratis wrote: >> I'm finding that CentOS 4 running cobbler reposync against a CentOS 5 >> repo is causing problems with the repodata. There has been a change >> in the format of the repo structure between 4/5. Is there a way I can >> use cobbler reposync under Centos 4 (creatrepo 0.4.3) while preserving >> the repodata from the upstream? >> >> For more info, please see: >> >> http://www.nabble.com/CentOS-4-Cobbler-Server-Hosting-CentOS-5-Repository-td17568366.html >> >> >> Thanks. >> >> -D >> >> _______________________________________________ >> et-mgmt-tools mailing list >> et-mgmt-tools at redhat.com >> https://www.redhat.com/mailman/listinfo/et-mgmt-tools >> > > It sounds like you are expressing a problem with yum-utils's > createrepo from EL4 not working against EL 5 repos. > While this problem is new to me, you should probably run from an EL-5 > server, that has a createrepo that can grok both. > > In either case, it's a problem with the createrepo program and not > something Cobbler is really involved with. It may be solved > by a simple upgrade of the package. > > --Michael > > > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools s/createrepo/reposync/ From dmourati at gmail.com Thu Jun 12 17:21:18 2008 From: dmourati at gmail.com (Demetri Mouratis) Date: Thu, 12 Jun 2008 10:21:18 -0700 Subject: [et-mgmt-tools] Way to Disable createrepo After cobbler reposync In-Reply-To: <48515988.3020304@redhat.com> References: <3cc2cbc40806121003m62ffb5d4t1d3f70b8e0038297@mail.gmail.com> <48515988.3020304@redhat.com> Message-ID: <3cc2cbc40806121021y479b6fcfrda731e6d1e59e070@mail.gmail.com> > It sounds like you are expressing a problem with yum-utils's createrepo from > EL4 not working against EL 5 repos. > While this problem is new to me, you should probably run from an EL-5 > server, that has a createrepo that can grok both. > > In either case, it's a problem with the createrepo program and not something > Cobbler is really involved with. It may be solved > by a simple upgrade of the package. > > --Michael Agreed with the source of the problem. I'm unable to upgrade to 5 for the cobbler server at this time. The createrepo packge is the latest. I'll pursue that separately. I wonder what value there is in rebuilding the repodata from a public mirror? Thanks. -D From mdehaan at redhat.com Thu Jun 12 17:26:15 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Thu, 12 Jun 2008 13:26:15 -0400 Subject: [et-mgmt-tools] Way to Disable createrepo After cobbler reposync In-Reply-To: <3cc2cbc40806121021y479b6fcfrda731e6d1e59e070@mail.gmail.com> References: <3cc2cbc40806121003m62ffb5d4t1d3f70b8e0038297@mail.gmail.com> <48515988.3020304@redhat.com> <3cc2cbc40806121021y479b6fcfrda731e6d1e59e070@mail.gmail.com> Message-ID: <48515C37.7060001@redhat.com> Demetri Mouratis wrote: >> It sounds like you are expressing a problem with yum-utils's createrepo from >> EL4 not working against EL 5 repos. >> While this problem is new to me, you should probably run from an EL-5 >> server, that has a createrepo that can grok both. >> >> In either case, it's a problem with the createrepo program and not something >> Cobbler is really involved with. It may be solved >> by a simple upgrade of the package. >> >> --Michael >> > > Agreed with the source of the problem. I'm unable to upgrade to 5 for > the cobbler server at this time. The createrepo packge is the latest. > I'll pursue that separately. > > I wonder what value there is in rebuilding the repodata from a public mirror? > > Thanks. > > -D > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > Latest as in "built from source" ? If you rsync a repo and do not rsync all of it (such as using an excludes file to not pull down Open Office translations), you have to generate the repodata again. --Michael From mdehaan at redhat.com Thu Jun 12 18:23:29 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Thu, 12 Jun 2008 14:23:29 -0400 Subject: [et-mgmt-tools] Enhancements to cobbler replicate in git (Running multiple cobbler servers? This is for you) Message-ID: <485169A1.6010603@redhat.com> Hi folks, I've added some things to the "cobbler replicate" command (thanks again to Scott Henson for coding that up). Now, in addition to syncing metadata for distributions and profiles, it also does repos, and optionally can do systems as well. It also has flags for being able to rsync tree and repo data, as well as the snippets and kickstart files that are used. Other content like the settings file, that needs to be set up specifically for each server, is not included in "replicate". So, why would you want this? Suppose you want to manage a cobbler server at several sites to have them be as fast as possible. However, you really don't want to have to make sure you send the same edits to every server -- you really just want to edit the items at the central server and have the remote cobbler servers clone them from that. There are some limitations to this -- currently it will override objects with the copy from the master when you use this... there's no "merge" kind of functionality because we don't keep "last modified" data on each field. Also, since we don't know if something from central is used remotely, we don't delete things that are removed on the central server. However, you can make this happen by just deleting the /var/lib/cobbler/(distros|profiles|systems|repos) files on the remote prior to running the replicate command. The syntax is: [root at mdehaan cobbler]# cobbler replicate --help Usage: cobbler replicate [ARGS] Options: -h, --help show this help message and exit --master=MASTER Cobbler server to replicate from. --include-systems include systems in addition to distros, profiles, and repos --full-data-sync rsync everything --sync-kickstarts rsync kickstart templates --sync-trees rsync imported trees --sync-triggers rsync trigger scripts --sync-repos rsync mirrored repo data So, for example, to replicate as much as possible, it's just: cobbler replicate --master=centralserver.example.org --include-systems --full-data-sync If you don't want to pull down the system records (I imagine this is usually true, as they are site specific) cobbler replicate --master=centralserver.example.org --full-data-sync If you are replicating via some other means (Net App mirroring, etc), you can run your own update scrips first, and then do the following to get the same features as before: cobbler replicate --master=centralserver.example.org The additional options just provide some of the things that "--full-data-sync" provides, for intance, you might want to sync the repos and trees, but not the triggers, so that's why there are seperate options for those. I'll put this up on the Wiki after getting some comments on what else might need to be added and whether this covers the potential use cases. Thoughts on whether this solves the needs of maintaing multiple cobbler servers centrally? Testing is welcome of course, this is in the development branch of git at the moment (1.1.X) and the code is relatively simple -- action_replicate.py. Thanks! --Michael From robin-lists at robinbowes.com Thu Jun 12 19:03:14 2008 From: robin-lists at robinbowes.com (Robin Bowes) Date: Thu, 12 Jun 2008 20:03:14 +0100 Subject: [et-mgmt-tools] Re: Cobbler reposync cron script In-Reply-To: <48514670.5090502@redhat.com> References: <485132FE.3000307@shazamteam.com> <485136AD.2070707@redhat.com> <20080612154347.GE28707@math.ohiou.edu> <48514670.5090502@redhat.com> Message-ID: Michael DeHaan wrote: > Matt Hyclak wrote: >> cobbler stops processing the remaining repos if it hits an error in >> one, so doing them one at a time allows the others to complete. >> > > That's something we can do in the code later, no doubt. Until then, this > does the job. The great thing is it doesn't really matter if it's Python > or shell as long as it works :) > > I'll see about adding a --retries to reposync in the future. I believe > there is already an RFE for a flag to skip the ones that > fail without blocking the rest. I think that should be the default - report if a repo fails, but keep going. In a similar vein to Sandor, I would think that something like the following would suffice in most cases: for repo in `cobbler repo list` do cobbler reposync --only=${repo} > /dev/null done I'd actually like to see much less output. For example, only reporting if any RPMS were downloaded or removed. R. From mdehaan at redhat.com Thu Jun 12 19:06:40 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Thu, 12 Jun 2008 15:06:40 -0400 Subject: [et-mgmt-tools] Re: Cobbler reposync cron script In-Reply-To: References: <485132FE.3000307@shazamteam.com> <485136AD.2070707@redhat.com> <20080612154347.GE28707@math.ohiou.edu> <48514670.5090502@redhat.com> Message-ID: <485173C0.7040005@redhat.com> Robin Bowes wrote: > Michael DeHaan wrote: >> Matt Hyclak wrote: >>> cobbler stops processing the remaining repos if it hits an error in >>> one, so doing them one at a time allows the others to complete. >>> >> >> That's something we can do in the code later, no doubt. Until then, >> this does the job. The great thing is it doesn't really matter if >> it's Python or shell as long as it works :) >> >> I'll see about adding a --retries to reposync in the future. I >> believe there is already an RFE for a flag to skip the ones that >> fail without blocking the rest. > > I think that should be the default - report if a repo fails, but keep > going. > > In a similar vein to Sandor, I would think that something like the > following would suffice in most cases: > > for repo in `cobbler repo list` > do > cobbler reposync --only=${repo} > /dev/null > done > > I'd actually like to see much less output. For example, only reporting > if any RPMS were downloaded or removed. > > R. > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools Sounds reasonable. As far as much less output goes, and the failure handling options, this is a fairly easy patch to make if someone wants to take a crack at it. Otherwise, it's another item on the big list of great requests :) Hop on #cobbler and I'll even provide help. --Michael From adrian.revill at shazamteam.com Fri Jun 13 13:01:23 2008 From: adrian.revill at shazamteam.com (Adrian Revill) Date: Fri, 13 Jun 2008 06:01:23 -0700 (PDT) Subject: [et-mgmt-tools] Cobbler reposync cron script In-Reply-To: <485136AD.2070707@redhat.com> References: <485132FE.3000307@shazamteam.com> <485136AD.2070707@redhat.com> Message-ID: <17822886.post@talk.nabble.com> Yes feel free to add it. I tried the change to use "cobbler list repo" and it works fine. Michael DeHaan wrote: > > Adrian Revill wrote: >> Just in case anyone needs a script to run cobbler reposync from cron, >> here is one i have written. It runs each repo in turn, and gives each >> a number of tries (10) to over come problems with failing syncs. >> >> #!/bin/bash >> >> TRIES=10 # number of times to try and run reposync >> LOGFILE="/var/log/cobbler/cobbler_reposync.log" >> >> function running { >> PID=$(ps ax| awk '/cobbler reposync/ && !/awk/ {print ($1)}') >> if [ -z $PID ] >> then >> log "cobbler reposync is not running" >> return 1 >> fi >> log "cobbler reposync is running PID=$PID" >> return 0 >> } >> >> function log { >> logger -t "COBBLER_REPOSYNC" -- $1 >> } >> >> function run { >> try=1 >> ret=1 >> while [ $try -le $TRIES ] >> do >> running >> ok=$? >> if [ $ok -eq 0 ] >> then >> log "Already running, aborting" >> break >> fi >> log "Attempt $try for $1" >> cobbler reposync --only=$1 2>&1 >> $LOGFILE >> ret=$? >> if [ $ret -eq 0 ] >> then >> break >> fi >> log "Attempt $try failed" >> try=$[ $try + 1 ] >> done >> if [ $ret -eq 0 ] >> then >> log "Compleated $1" >> else >> log "Too many trys or already running, giving up on $1" >> >> fi >> } >> >> log "Starting" >> mv $LOGFILE $LOGFILE.1 >> >> for name in $(awk '/name:/ {print($2)}' /var/lib/cobbler/repos) >> do >> run $name >> done >> >> _______________________________________________ >> et-mgmt-tools mailing list >> et-mgmt-tools at redhat.com >> https://www.redhat.com/mailman/listinfo/et-mgmt-tools > > Nice! Do you mind if I put this in a 'contrib' directory in cobbler's > version control so other people can find it later? > > We can mention this on the Wiki too. > > One small change I'd make is to make the last awk line run 'cobbler repo > list' instead of grepping the file, that way > it works regardless of the storage backend -- though everyone pretty > much uses the stock one. > > --Michael > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > > -- View this message in context: http://www.nabble.com/Cobbler-reposync-cron-script-tp17801508p17822886.html Sent from the et-mgmt-tools mailing list archive at Nabble.com. From adrian.revill at shazamteam.com Fri Jun 13 13:14:31 2008 From: adrian.revill at shazamteam.com (Adrian Revill) Date: Fri, 13 Jun 2008 06:14:31 -0700 (PDT) Subject: [et-mgmt-tools] Cobbler reposync cron script In-Reply-To: <17822886.post@talk.nabble.com> References: <485132FE.3000307@shazamteam.com> <485136AD.2070707@redhat.com> <17822886.post@talk.nabble.com> Message-ID: <17823138.post@talk.nabble.com> Not sure where to post this. I think i have found a problem in cobbler reposync. Sometimes if a rpm is partially downloaded and /usr/bin/reposync is stopped, say by a collegue rebooting the server, grrr. /usr/bin/reposync wont continue and throws an error untill the file is deleted. e.g. Traceback (most recent call last): File "/usr/bin/reposync", line 264, in ? main() File "/usr/bin/reposync", line 245, in main path = repo.getPackage(pkg) File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 652, in getPackage cache=cache File "/usr/lib/yum-plugins/rhnplugin.py", line 299, in _getFile raise yum.Errors.RepoError, \ yum.Errors.RepoError: failed to retrieve getPackage/openoffice.org-impress-2.0.4 -5.4.17.1.x86_64.rpm from rhel-x86_64-server-productivity-5 error was [Errno 9] Requested Range Not Satisfiable cobbler reposync failed This is not caught by my script because cobbler terminates with a return code of 0, but cobbler knows it has failed. Looking at action_reposync.py rc = sub_process.call(cmd, shell=True) if rc !=0: raise CX(_("cobbler reposync failed")) The return code from /usr/bin/reposync is being caught, but it looks like what ever handles the exception raised does not pass it on. Sorry my python is non existant so i cant follow it any further, any one know how to make a quick fix? Adrian Revill wrote: > > Yes feel free to add it. > > I tried the change to use "cobbler list repo" and it works fine. > > > Michael DeHaan wrote: >> >> Adrian Revill wrote: >>> Just in case anyone needs a script to run cobbler reposync from cron, >>> here is one i have written. It runs each repo in turn, and gives each >>> a number of tries (10) to over come problems with failing syncs. >>> >>> #!/bin/bash >>> >>> TRIES=10 # number of times to try and run reposync >>> LOGFILE="/var/log/cobbler/cobbler_reposync.log" >>> >>> function running { >>> PID=$(ps ax| awk '/cobbler reposync/ && !/awk/ {print ($1)}') >>> if [ -z $PID ] >>> then >>> log "cobbler reposync is not running" >>> return 1 >>> fi >>> log "cobbler reposync is running PID=$PID" >>> return 0 >>> } >>> >>> function log { >>> logger -t "COBBLER_REPOSYNC" -- $1 >>> } >>> >>> function run { >>> try=1 >>> ret=1 >>> while [ $try -le $TRIES ] >>> do >>> running >>> ok=$? >>> if [ $ok -eq 0 ] >>> then >>> log "Already running, aborting" >>> break >>> fi >>> log "Attempt $try for $1" >>> cobbler reposync --only=$1 2>&1 >> $LOGFILE >>> ret=$? >>> if [ $ret -eq 0 ] >>> then >>> break >>> fi >>> log "Attempt $try failed" >>> try=$[ $try + 1 ] >>> done >>> if [ $ret -eq 0 ] >>> then >>> log "Compleated $1" >>> else >>> log "Too many trys or already running, giving up on $1" >>> >>> fi >>> } >>> >>> log "Starting" >>> mv $LOGFILE $LOGFILE.1 >>> >>> for name in $(awk '/name:/ {print($2)}' /var/lib/cobbler/repos) >>> do >>> run $name >>> done >>> >>> _______________________________________________ >>> et-mgmt-tools mailing list >>> et-mgmt-tools at redhat.com >>> https://www.redhat.com/mailman/listinfo/et-mgmt-tools >> >> Nice! Do you mind if I put this in a 'contrib' directory in cobbler's >> version control so other people can find it later? >> >> We can mention this on the Wiki too. >> >> One small change I'd make is to make the last awk line run 'cobbler repo >> list' instead of grepping the file, that way >> it works regardless of the storage backend -- though everyone pretty >> much uses the stock one. >> >> --Michael >> >> _______________________________________________ >> et-mgmt-tools mailing list >> et-mgmt-tools at redhat.com >> https://www.redhat.com/mailman/listinfo/et-mgmt-tools >> >> > > -- View this message in context: http://www.nabble.com/Cobbler-reposync-cron-script-tp17801508p17823138.html Sent from the et-mgmt-tools mailing list archive at Nabble.com. From mdehaan at redhat.com Fri Jun 13 13:30:49 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Fri, 13 Jun 2008 09:30:49 -0400 Subject: [et-mgmt-tools] Cobbler reposync cron script In-Reply-To: <17823138.post@talk.nabble.com> References: <485132FE.3000307@shazamteam.com> <485136AD.2070707@redhat.com> <17822886.post@talk.nabble.com> <17823138.post@talk.nabble.com> Message-ID: <48527689.5000502@redhat.com> Adrian Revill wrote: > Not sure where to post this. > > I think i have found a problem in cobbler reposync. > > Sometimes if a rpm is partially downloaded and /usr/bin/reposync is stopped, > say by a collegue rebooting the server, grrr. > /usr/bin/reposync wont continue and throws an error untill the file is > deleted. e.g. > Traceback (most recent call last): > File "/usr/bin/reposync", line 264, in ? > main() > File "/usr/bin/reposync", line 245, in main > path = repo.getPackage(pkg) > File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 652, in > getPackage > cache=cache > File "/usr/lib/yum-plugins/rhnplugin.py", line 299, in _getFile > raise yum.Errors.RepoError, \ > yum.Errors.RepoError: failed to retrieve > getPackage/openoffice.org-impress-2.0.4 > -5.4.17.1.x86_64.rpm from rhel-x86_64-server-productivity-5 > error was [Errno 9] Requested Range Not Satisfiable > cobbler reposync failed > > > This is not caught by my script because cobbler terminates with a return > code of 0, but cobbler knows it has failed. > > Looking at action_reposync.py > > rc = sub_process.call(cmd, shell=True) > if rc !=0: > raise CX(_("cobbler reposync failed")) > > The return code from /usr/bin/reposync is being caught, but it looks like > what ever handles the exception raised does not pass it on. > Sorry my python is non existant so i cant follow it any further, any one > know how to make a quick fix? > > > > > > > > > Adrian Revill wrote: > >> Yes feel free to add it. >> >> I tried the change to use "cobbler list repo" and it works fine. >> >> >> Michael DeHaan wrote: >> >>> Adrian Revill wrote: >>> >>>> Just in case anyone needs a script to run cobbler reposync from cron, >>>> here is one i have written. It runs each repo in turn, and gives each >>>> a number of tries (10) to over come problems with failing syncs. >>>> >>>> #!/bin/bash >>>> >>>> TRIES=10 # number of times to try and run reposync >>>> LOGFILE="/var/log/cobbler/cobbler_reposync.log" >>>> >>>> function running { >>>> PID=$(ps ax| awk '/cobbler reposync/ && !/awk/ {print ($1)}') >>>> if [ -z $PID ] >>>> then >>>> log "cobbler reposync is not running" >>>> return 1 >>>> fi >>>> log "cobbler reposync is running PID=$PID" >>>> return 0 >>>> } >>>> >>>> function log { >>>> logger -t "COBBLER_REPOSYNC" -- $1 >>>> } >>>> >>>> function run { >>>> try=1 >>>> ret=1 >>>> while [ $try -le $TRIES ] >>>> do >>>> running >>>> ok=$? >>>> if [ $ok -eq 0 ] >>>> then >>>> log "Already running, aborting" >>>> break >>>> fi >>>> log "Attempt $try for $1" >>>> cobbler reposync --only=$1 2>&1 >> $LOGFILE >>>> ret=$? >>>> if [ $ret -eq 0 ] >>>> then >>>> break >>>> fi >>>> log "Attempt $try failed" >>>> try=$[ $try + 1 ] >>>> done >>>> if [ $ret -eq 0 ] >>>> then >>>> log "Compleated $1" >>>> else >>>> log "Too many trys or already running, giving up on $1" >>>> >>>> fi >>>> } >>>> >>>> log "Starting" >>>> mv $LOGFILE $LOGFILE.1 >>>> >>>> for name in $(awk '/name:/ {print($2)}' /var/lib/cobbler/repos) >>>> do >>>> run $name >>>> done >>>> >>>> _______________________________________________ >>>> et-mgmt-tools mailing list >>>> et-mgmt-tools at redhat.com >>>> https://www.redhat.com/mailman/listinfo/et-mgmt-tools >>>> >>> Nice! Do you mind if I put this in a 'contrib' directory in cobbler's >>> version control so other people can find it later? >>> >>> We can mention this on the Wiki too. >>> >>> One small change I'd make is to make the last awk line run 'cobbler repo >>> list' instead of grepping the file, that way >>> it works regardless of the storage backend -- though everyone pretty >>> much uses the stock one. >>> >>> --Michael >>> >>> _______________________________________________ >>> et-mgmt-tools mailing list >>> et-mgmt-tools at redhat.com >>> https://www.redhat.com/mailman/listinfo/et-mgmt-tools >>> >>> >>> >> > > Please file bugs in Trac here: https://fedorahosted.org/cobbler, and I'll take a look at it. --Michael From mdehaan at redhat.com Fri Jun 13 14:35:08 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Fri, 13 Jun 2008 10:35:08 -0400 Subject: [et-mgmt-tools] Teaching cobbler about images & power Message-ID: <4852859C.10405@redhat.com> These are two things I want to look at doing soon. (A) The image use case: We're already using Cobbler to help manage DHCP, DNS, PXE trees, and abstract out all of the glue that holds the OS's together. One thing that it doesn't do though, is have a good way to deploy images to physical machines (cloning). Kickstart is pretty flexible, I like it better, but I know that doesn't solve all the problems of deploying "that other OS" and so forth. Images are also important for the appliance space, and we'll also be able to eventually use the same kind of image database for virt images depending on how we play our cards. So, since things like udpcast allow network deployment of the "target" boot image, this seems like it would be easy to do something like. cobbler system add --name=foo --clone=this-image-target # syntax completely made up at this point And have that system then netboot the "reciever" image. (This seems to indicate you can't clone two different images at the same time, but maybe the reciever has options for that? Hmmm... that would be nice). Cobbler could manage the TFTP tree for something like updcast pretty easily as well as kicking off the right sender commands and organizing the images. We could also do things like "cobbler image add" to maintain the list of images and have them easily assignable/browseable in the Web app. (B) Power management. Do something with FreeIPMI / OpenIPMI (I haven't investigated either of these in depth yet -- there may be alternatives), so that when assigning a new profile to a system record it is then trivial to also power cycle that system. This would make PXE reinstallations easier (especially where you can't SSH in to restart them) and also would help cobbler become more of a tool for managing the low level system bits. Does anyone care to share any of their favorite open source tools, scripts, and ideas for dealing with either of the above? It would be nice to have some things that were similar to what folks were already using, and that also means more help in testing and that we're doing the right thing. --Michael From cmacleod at redhat.com Fri Jun 13 14:57:05 2008 From: cmacleod at redhat.com (Chris MacLeod) Date: Fri, 13 Jun 2008 10:57:05 -0400 Subject: [et-mgmt-tools] Teaching cobbler about images & power In-Reply-To: <4852859C.10405@redhat.com> References: <4852859C.10405@redhat.com> Message-ID: <0E9D07E9-BB43-4372-8E5C-57021ABB1C2E@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Jun 13, 2008, at 10:35 AM, Michael DeHaan wrote: > These are two things I want to look at doing soon. > > (A) > The image use case: > > We're already using Cobbler to help manage DHCP, DNS, PXE trees, and > abstract out all of the glue that holds the OS's together. One > thing that it doesn't do though, is have a good way to deploy images > to physical machines (cloning). Kickstart is pretty flexible, I > like it better, but I know that doesn't solve all the problems of > deploying "that other OS" and so forth. Images are also important > for the appliance space, and we'll also be able to eventually use > the same kind of image database for virt images depending on how we > play our cards. > This would also be extremely useful for things like hardware vendor firmware images, BIOS updates, etc. C -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFIUorB0LdOhWiSZUwRAlZbAKDdtlYsXu4Sgwu37aQg+iwI+a3VNQCeIIq4 Bn0JmHjeKE+On2ZqhH/yRxc= =iIYM -----END PGP SIGNATURE----- From adrian.revill at shazamteam.com Fri Jun 13 16:01:01 2008 From: adrian.revill at shazamteam.com (Adrian Revill) Date: Fri, 13 Jun 2008 17:01:01 +0100 Subject: [et-mgmt-tools] Virt-manager and bonded nic's Message-ID: <485299BD.1070808@shazamteam.com> Hi, We have set up a RH Cluster using rhel5.2 and are running bonded nics with vlans. /# brctl show bridge name bridge id STP enabled interfaces virbr0 8000.000000000000 yes xenbr0 8000.000e0cc59628 yes bond1.300 vif0.0 xenbr1 8000.000e0cc59628 yes bond1.400 vif0.1 xenbr2 8000.000e0cc59628 yes bond1.10 vif0.2 xenbr3 8000.000000000000 no/ The problem is, virt-manager does not show the bonded interfaces, but shows the all the ethx interfaces grayed out. This means we cant select a network via virt-manager, but have select a virtual network, then manually edit the config file after. From Pablo.Iranzo at redhat.com Fri Jun 13 18:12:36 2008 From: Pablo.Iranzo at redhat.com (=?UTF-8?Q?Pablo_Iranzo_G=C3=B3mez?=) Date: Fri, 13 Jun 2008 20:12:36 +0200 (CEST) Subject: [et-mgmt-tools] Teaching cobbler about images & power In-Reply-To: <4852859C.10405@redhat.com> References: <4852859C.10405@redhat.com> Message-ID: On Fri, 13 Jun 2008, Michael DeHaan wrote: > These are two things I want to look at doing soon. > > (A) > > The image use case: > > We're already using Cobbler to help manage DHCP, DNS, PXE trees, and > abstract out all of the glue that holds the OS's together. One thing > that it doesn't do though, is have a good way to deploy images to > physical machines (cloning). Kickstart is pretty flexible, I like it > better, but I know that doesn't solve all the problems of deploying > "that other OS" and so forth. Images are also important for the > appliance space, and we'll also be able to eventually use the same kind > of image database for virt images depending on how we play our cards. > > So, since things like udpcast allow network deployment of the "target" > boot image, this seems like it would be easy to do something like. > > cobbler system add --name=foo --clone=this-image-target # syntax > completely made up at this point This could be done in a Unattended-like setup. As explained on wiki, Unattended is a set of Kernel, Initrd and Perl scripts that setups a dosemu to install Hasecorp's Hasefroch system. For deploying images, that kind of setup with a "kernel" and "initrd" with an embedded "partimage" could help connect to a server with cobbler and use a parameter passed on kernel command line to determine image to clone on local disk. > Do something with FreeIPMI / OpenIPMI (I haven't investigated either of > these in depth yet -- there may be alternatives), so that when assigning > a new profile to a system record it is then trivial to also power cycle > that system. This would make PXE reinstallations easier (especially > where you can't SSH in to restart them) and also would help cobbler > become more of a tool for managing the low level system bits. Then here could fit another proposal: Remote management cards, for example interaction with iLO interfaces or Remote View Service Boards among others, in the same way as "fence" does for GFS. Regards Pablo From mdehaan at redhat.com Fri Jun 13 19:02:18 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Fri, 13 Jun 2008 15:02:18 -0400 Subject: [et-mgmt-tools] Teaching cobbler about images & power In-Reply-To: References: <4852859C.10405@redhat.com> Message-ID: <4852C43A.6010301@redhat.com> Pablo Iranzo G?mez wrote: > On Fri, 13 Jun 2008, Michael DeHaan wrote: > > >> These are two things I want to look at doing soon. >> >> (A) >> >> The image use case: >> >> We're already using Cobbler to help manage DHCP, DNS, PXE trees, and >> abstract out all of the glue that holds the OS's together. One thing >> that it doesn't do though, is have a good way to deploy images to >> physical machines (cloning). Kickstart is pretty flexible, I like it >> better, but I know that doesn't solve all the problems of deploying >> "that other OS" and so forth. Images are also important for the >> appliance space, and we'll also be able to eventually use the same kind >> of image database for virt images depending on how we play our cards. >> >> So, since things like udpcast allow network deployment of the "target" >> boot image, this seems like it would be easy to do something like. >> >> cobbler system add --name=foo --clone=this-image-target # syntax >> completely made up at this point >> > > > This could be done in a Unattended-like setup. As explained on > wiki, Unattended is a set of Kernel, Initrd and Perl scripts that setups a > dosemu to install Hasecorp's Hasefroch system. For deploying images, that > kind of setup with a "kernel" and "initrd" with an embedded "partimage" > could help connect to a server with cobbler and use a parameter passed on > kernel command line to determine image to clone on local disk. > Clonezilla is apparently udpcast + partimage I'm probably not going to be doing anything with unattended specifically as we don't want to do something Windows specific when some people still have reasons for deploying other operating systems. > >> Do something with FreeIPMI / OpenIPMI (I haven't investigated either of >> these in depth yet -- there may be alternatives), so that when assigning >> a new profile to a system record it is then trivial to also power cycle >> that system. This would make PXE reinstallations easier (especially >> where you can't SSH in to restart them) and also would help cobbler >> become more of a tool for managing the low level system bits. >> > > > Then here could fit another proposal: Remote management cards, for > example interaction with iLO interfaces or Remote View Service Boards > among others, in the same way as "fence" does for GFS. > That too... > Regards > Pablo > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > From crobinso at redhat.com Fri Jun 13 19:42:57 2008 From: crobinso at redhat.com (Cole Robinson) Date: Fri, 13 Jun 2008 15:42:57 -0400 Subject: [et-mgmt-tools] Virt-manager and bonded nic's In-Reply-To: <485299BD.1070808@shazamteam.com> References: <485299BD.1070808@shazamteam.com> Message-ID: <4852CDC1.5080406@redhat.com> Adrian Revill wrote: > Hi, > > We have set up a RH Cluster using rhel5.2 and are running bonded nics > with vlans. > > /# brctl show > bridge name bridge id STP enabled interfaces > virbr0 8000.000000000000 yes > xenbr0 8000.000e0cc59628 yes bond1.300 > > vif0.0 > xenbr1 8000.000e0cc59628 yes bond1.400 > > vif0.1 > xenbr2 8000.000e0cc59628 yes bond1.10 > > vif0.2 > xenbr3 8000.000000000000 no/ > > The problem is, virt-manager does not show the bonded interfaces, but > shows the all the ethx interfaces grayed out. > This means we cant select a network via virt-manager, but have select a > virtual network, then manually edit the config file after. > Hi, this should be working upstream: bonding and vlan support was added in february and is in version 0.5.4: http://hg.et.redhat.com/virt/applications/virt-manager--devel?cs=6a155cfe437c However this isn't in the virt-manager version in RHEL 5.2. If you'd like to see this in RHEL please file a bug requesting this for 5.3. Thanks, Cole From crobinso at redhat.com Fri Jun 13 19:50:29 2008 From: crobinso at redhat.com (Cole Robinson) Date: Fri, 13 Jun 2008 15:50:29 -0400 Subject: [et-mgmt-tools] Problem with "hang" on AMD chip In-Reply-To: <0ed58e4d5cc916350a4deaff38f252cb@haigmail.com> References: <0ed58e4d5cc916350a4deaff38f252cb@haigmail.com> Message-ID: <4852CF85.4050109@redhat.com> lhaig-haigmail.com wrote: > Hi, > > I just tried using kvm on my Dell AMD64 laptop and virt-manager. I can > create a vm quite fine and I can start it. > Booting of an iso file the vm boots and starts set-up but then hangs the > whole machine. no keyboard mouse access. > > You can still ping the host but not connect via ssh. > > Other machines running the same os "ForesightLinux" do not have this > problem. > > How can I start debugging this? > > Thanks > > Lance > This isn't really the correct mailing list for this type of problem. My recommendation would be to pull down the latest upstream kvm release and see if you can reproduce the problem there, and if so take it to one of the upstream kvm lists (http://kvm.qumranet.com/kvmwiki/Lists%2C_IRC). - Cole From crobinso at redhat.com Fri Jun 13 20:26:38 2008 From: crobinso at redhat.com (Cole Robinson) Date: Fri, 13 Jun 2008 16:26:38 -0400 Subject: [et-mgmt-tools] virt-manager new behavior: app wont close if details window present Message-ID: <4852D7FE.5040608@redhat.com> Hi all, Just a heads up that I've just committed some changes to virt-manager that alter default behavior. Previously, if the 'Manager' window was closed, the entire app would shutdown. This is not all that desirable as a typical user might just want console access to a VM or two, not requiring the Manager to be present. The changes keep the app running as long as either the Manager or a Details/Console window is visible. Menu buttons were also added to the Details view to return to the Manager if it has been closed, and antother to fully quit the app regardless of open windows. I posted a screenshot of the new menu items for reference. Thanks, Cole [1] http://crobinso.fedorapeople.org/virt-manager/vmm-new-details-menu.png From crobinso at redhat.com Fri Jun 13 20:36:28 2008 From: crobinso at redhat.com (Cole Robinson) Date: Fri, 13 Jun 2008 16:36:28 -0400 Subject: [et-mgmt-tools] [PATCH] virt-inst Package an image for VMware distribution In-Reply-To: <484ED675.5070608@redhat.com> References: <484058D2.6030006@redhat.com> <48497639.8090108@redhat.com> <484D6391.5060800@redhat.com> <484EC1BD.7010507@redhat.com> <484ED675.5070608@redhat.com> Message-ID: <4852DA4C.9030400@redhat.com> Joey Boggs wrote: > Made more updates based on comments. > This version looks good to me. If Dan is fine with it as well i'll commit it. Thanks, Cole > diff -Naur virtinst--devel.orig/virtinst/UnWare.py virtinst--devel/virtinst/UnWare.py > --- virtinst--devel.orig/virtinst/UnWare.py 1969-12-31 19:00:00.000000000 -0500 > +++ virtinst--devel/virtinst/UnWare.py 2008-06-10 15:22:17.000000000 -0400 > @@ -0,0 +1,309 @@ > +# > +# Processing of VMWare(tm) .vmx files > +# > +# Copyright 2007 Red Hat, Inc. > +# David Lutterkort > +# > +# This program is free software; you can redistribute it and/or modify > +# it under the terms of the GNU General Public License as published by > +# the Free Software Foundation; either version 2 of the License, or > +# (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program; if not, write to the Free Software > +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, > +# MA 02110-1301 USA. > + > +import time > +import sys > +import os > +import logging > +import ImageParser > +import util > + > +class Disk: > + """A disk for a VMWare(tm) virtual machine""" > + > + MONOLITHIC_FLAT = "monolithicFlat" > + TWO_GB_MAX_EXTENT_SPARSE = "twoGbMaxExtentSparse" > + # This seems only to be usable if the vmdk header is embedded in the > + # data file, not when the descriptor is in a separate text file. Use > + # TWO_GB_MAX_EXTENT_SPARSE instead. > + # VMWare's(tm) documentation of VMDK seriously sucks. A lot. > + MONOLITHIC_SPARSE = "monolithicSparse" > + > + IDE_HEADS = 16 > + IDE_SECTORS = 63 > + > + def __init__(self, descriptor, extent, size, dev, format): > + """Create a new disk. DESCRIPTOR is the name of the VMDK descriptor > + file. EXTENT is the name of the file holding the actual data. SIZE > + is the filesize in bytes. DEV identifies the device, for IDE (the > + only one supported right now) it should be $bus:$master. FORMAT is > + the format of the underlying extent, one of the formats defined in > + virtinst.ImageParser.Disk""" > + self.cid = 0xffffffff > + self.createType = Disk.MONOLITHIC_FLAT > + self.descriptor = descriptor > + self.extent = extent > + self.size = size > + self.dev = dev > + self.format = format > + > + def make_extent(self, base): > + """Write the descriptor file, and create the extent as a monolithic > + sparse extent if it does not exist yet""" > + f = os.path.join(base, self.extent) > + logging.debug("Checking %s" % f) > + if not os.path.exists(f): > + util.system("qemu-img create -f vmdk %s %d" % (f, self.size/1024)) > + self.createType = Disk.TWO_GB_MAX_EXTENT_SPARSE > + else: > + qemu = os.popen("qemu-img info %s" % f, "r") > + for l in qemu: > + (tag, val) = l.split(":") > + if tag == "file format" and val.strip() == "vmdk": > + self.createType = Disk.TWO_GB_MAX_EXTENT_SPARSE > + qemu.close() > + return self.extent > + > + def _VMDK_TEMPLATE(self): > + > + blocks = self.size/512 > + if self.createType == Disk.MONOLITHIC_FLAT: > + vmdk_extent_info= "RW %d FLAT \"%s\" 0\n" % (blocks, os.path.basename(self.extent)) > + else: # Disk.MONOLITHIC_SPARSE > + vmdk_extent_info= "RW %d SPARSE \"%s\"\n" % (blocks, os.path.basename(self.extent)) > + > + vmdk_dict = { > + "SELF_CID" : self.cid, > + "CREATE_TYPE" : self.createType, > + "IDE_SECTORS" : Disk.IDE_SECTORS, > + "IDE_HEADS" : Disk.IDE_HEADS, > + "IDE_BLOCKS" : blocks, > + "IDE_CYLINDERS" : blocks/(Disk.IDE_SECTORS*Disk.IDE_HEADS), > + "VMDK_EXTENT_INFO" : vmdk_extent_info, > + } > + > + vmdk = """# Disk DescriptorFile > +# Generated from virtinst > +version=1 > + > +CID=%(SELF_CID)s > +parentCID=ffffffff > +createType="%(CREATE_TYPE)s" > + > +# Extent description > +%(VMDK_EXTENT_INFO)s > + > +# Disk Data Base > +ddb.virtualHWVersion = "4" > +ddb.adapterType = "ide" > +ddb.geometry.sectors = "%(IDE_SECTORS)s" > +ddb.geometry.heads = "%(IDE_HEADS)s" > +ddb.geometry.cylinders = "%(IDE_CYLINDERS)s" > +""" > + vmdk = vmdk % vmdk_dict > + return vmdk > + > + > + def to_vmx(self): > + """Return the fragment for the VMX file for this disk""" > + > + vmx = "" > + vmx_dict = { > + "dev" : self.dev, > + "disk_filename" : self.descriptor > + } > + if self.format == ImageParser.Disk.FORMAT_ISO: > + vmx = _VMX_ISO_TEMPLATE % vmx_dict > + else: # FORMAT_RAW > + vmx = _VMX_IDE_TEMPLATE % vmx_dict > + return vmx > + > +class Image: > + """Represent an image for generation of a VMWare(tm) description""" > + > + def __init__(self, image = None): > + if image is not None: > + self._init_from_image(image) > + > + def _init_from_image(self, image): > + domain = image.domain > + boot = domain.boots[0] > + > + self.base = image.base > + self.name = image.name > + self.descr = image.descr > + self.label = image.label > + self.vcpu = domain.vcpu > + self.memory = domain.memory > + self.interface = domain.interface > + > + self.disks = [] > + for d in boot.drives: > + disk = d.disk > + descriptor = sub_ext(disk.file, ".vmdk") > + if disk.size is None: > + f = os.path.join(image.base, disk.file) > + size = os.stat(f).st_size > + else: > + size = long(disk.size) * 1024L * 1024L > + ide_count = len(self.disks) > + dev = "%d:%d" % (ide_count / 2, ide_count % 2) > + self.disks.append(Disk(descriptor, disk.file, size, dev, > + disk.format)) > + > + def make(self, base): > + """Write the descriptor file and all the disk descriptors""" > + files = [] > + out = open(os.path.join(self.base, self.name + ".vmx"), "w") > + out.write(self.to_vmx()) > + out.close() > + files.append(self.name + ".vmx") > + > + for d in self.disks: > + f = d.make_extent(self.base) > + files.append(f) > + out = open(os.path.join(base, d.descriptor), "w") > + out.write(d._VMDK_TEMPLATE()) > + out.close() > + files.append(d.descriptor) > + return files > + > + def to_vmx(self): > + """Return the VMX description of this image""" > + # Strip blank spaces and EOL to prevent syntax errors in vmx file > + self.descr = self.descr.strip() > + self.descr = self.descr.replace("\n","|") > + > + dict = { > + "now": time.strftime("%Y-%m-%dT%H:%M:%S %Z", time.localtime()), > + "progname": os.path.basename(sys.argv[0]), > + "/image/name": self.name, > + "/image/description": self.descr or "None", > + "/image/label": self.label or self.name, > + "/image/devices/vcpu" : self.vcpu, > + "/image/devices/memory": long(self.memory)/1024 > + } > + > + vmx = _VMX_MAIN_TEMPLATE % dict > + if self.interface: > + vmx += _VMX_ETHER_TEMPLATE > + > + for d in self.disks: > + vmx += d.to_vmx() > + > + return vmx > + > +def sub_ext(filename, ext): > + return os.path.splitext(filename)[0] + ext > + > +_VMX_MAIN_TEMPLATE = """ > +#!/usr/bin/vmplayer > + > +# Generated %(now)s by %(progname)s > +# http://virt-manager.et.redhat.com/ > + > +# This is a Workstation 5 or 5.5 config file > +# It can be used with Player > +config.version = "8" > +virtualHW.version = "4" > + > +# Selected operating system for your virtual machine > +guestOS = "other" > + > +# displayName is your own name for the virtual machine > +displayName = "%(/image/name)s" > + > +# These fields are free text description fields > +annotation = "%(/image/description)s" > +guestinfo.vmware.product.long = "%(/image/label)s" > +guestinfo.vmware.product.url = "http://virt-manager.et.redhat.com/" > +guestinfo.vmware.product.class = "virtual machine" > + > +# Number of virtual CPUs. Your virtual machine will not > +# work if this number is higher than the number of your physical CPUs > +numvcpus = "%(/image/devices/vcpu)s" > + > +# Memory size and other memory settings > +memsize = "%(/image/devices/memory)d" > +MemAllowAutoScaleDown = "FALSE" > +MemTrimRate = "-1" > + > +# Unique ID for the virtual machine will be created > +uuid.action = "create" > + > +## For appliances where tools are installed already, this should really > +## be false, but we don't have that ionfo in the metadata > +# Remind to install VMware Tools > +# This setting has no effect in VMware Player > +tools.remindInstall = "TRUE" > + > +# Startup hints interfers with automatic startup of a virtual machine > +# This setting has no effect in VMware Player > +hints.hideAll = "TRUE" > + > +# Enable time synchronization between computer > +# and virtual machine > +tools.syncTime = "TRUE" > + > +# First serial port, physical COM1 is not available > +serial0.present = "FALSE" > + > +# Optional second serial port, physical COM2 is not available > +serial1.present = "FALSE" > + > +# First parallell port, physical LPT1 is not available > +parallel0.present = "FALSE" > + > +# Logging > +# This config activates logging, and keeps last log > +logging = "TRUE" > +log.fileName = "%(/image/name)s.log" > +log.append = "TRUE" > +log.keepOld = "3" > + > +# These settings decides interaction between your > +# computer and the virtual machine > +isolation.tools.hgfs.disable = "FALSE" > +isolation.tools.dnd.disable = "FALSE" > +isolation.tools.copy.enable = "TRUE" > +isolation.tools.paste.enabled = "TRUE" > + > +# Settings for physical floppy drive > +floppy0.present = "FALSE" > +""" > + > +_VMX_ETHER_TEMPLATE = """ > +## if /image/devices/interface is present: > +# First network interface card > +ethernet0.present = "TRUE" > +ethernet0.connectionType = "nat" > +ethernet0.addressType = "generated" > +ethernet0.generatedAddressOffset = "0" > +ethernet0.autoDetect = "TRUE" > +""" > + > +_VMX_ISO_TEMPLATE = """ > +# CDROM drive > +ide%(dev)s.present = "TRUE" > +ide%(dev)s.deviceType = "cdrom-raw" > +ide%(dev)s.startConnected = "TRUE" > +ide%(dev)s.fileName = "%(disk_filename)s" > +ide%(dev)s.autodetect = "TRUE" > +""" > + > +_VMX_IDE_TEMPLATE = """ > +# IDE disk > +ide%(dev)s.present = "TRUE" > +ide%(dev)s.fileName = "%(disk_filename)s" > +ide%(dev)s.mode = "persistent" > +ide%(dev)s.startConnected = "TRUE" > +ide%(dev)s.writeThrough = "TRUE" > +""" > diff -Naur virtinst--devel.orig/virt-pack virtinst--devel/virt-pack > --- virtinst--devel.orig/virt-pack 1969-12-31 19:00:00.000000000 -0500 > +++ virtinst--devel/virt-pack 2008-06-10 15:28:36.000000000 -0400 > @@ -0,0 +1,143 @@ > +#!/usr/bin/python -tt > +# > +# Package and unpackage images for distribution > +# > +# Copyright 2007 Red Hat, Inc. > +# David Lutterkort > +# > +# This program is free software; you can redistribute it and/or modify > +# it under the terms of the GNU General Public License as published by > +# the Free Software Foundation; either version 2 of the License, or > +# (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program; if not, write to the Free Software > +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, > +# MA 02110-1301 USA. > + > +import os, sys, string > +from optparse import OptionParser, OptionValueError > +import subprocess > +import logging > +import libxml2 > +import urlgrabber.progress as progress > + > +import virtinst > +import virtinst.ImageParser > +import virtinst.CapabilitiesParser > +import virtinst.cli as cli > +import virtinst.util as util > +import virtinst.UnWare > + > +import tempfile > + > +import gettext > +import locale > + > +locale.setlocale(locale.LC_ALL, '') > +gettext.bindtextdomain(virtinst.gettext_app, virtinst.gettext_dir) > +gettext.install(virtinst.gettext_app, virtinst.gettext_dir) > + > +class PackageException(Exception): > + def __init__(self, msg): > + Exception.__init__(self, msg) > + > +class Package: > + > + def __init__(self, image): > + self.image = image > + if image.name is None or image.version is None: > + raise PackageException( > + _("The image name and version must be present")) > + self.vername = "%s-%s" % (image.name, image.version) > + self.tmpdir = tempfile.mkdtemp(dir="/var/tmp", prefix="virt-pack") > + self.stagedir = os.path.join(self.tmpdir, self.vername) > + self.files = [] > + > + def add_image_files(self): > + cwd = os.getcwd() > + img = self.image > + self.files.append(os.path.basename(img.filename)) > + os.chdir(img.base) > + for d in img.storage.keys(): > + disk = img.storage[d] > + if disk.use == disk.USE_SCRATCH: > + if disk.size is None: > + raise PackageException(_("Scratch disk %s does not have a size attribute") % disk.id) > + else: > + if not os.path.exists(disk.file): > + raise PackageException(_("Disk file %s could not be found") % disk.id) > + self.files.append(disk.file) > + os.path.exists(os.path.join(img.base, disk.file)) > + > + def make_vmx_files(self): > + img = virtinst.UnWare.Image(self.image) > + files = img.make(self.image.base) > + self.files.extend(files) > + > + def pack(self, outdir): > + outfile = os.path.join(outdir, self.vername + ".tgz") > + for f in set(self.files): > + dir = os.path.join(self.stagedir, os.path.dirname(f)) > + if not os.path.exists(dir): > + os.makedirs(dir) > + os.symlink(os.path.join(self.image.base, f), > + os.path.join(self.stagedir, f)) > + print _("Writing %s") % outfile > + cmd = "tar chzv -C %s -f %s %s" % (self.tmpdir, > + outfile, > + os.path.basename(self.vername)) > + util.system(cmd) > + return outfile > + > +### Option parsing > +def parse_args(): > + parser = OptionParser() > + parser.set_usage("%prog [options] image.xml") > + > + parser.add_option("-o", "--output", type="string", dest="output", > + action="callback", callback=cli.check_before_store, > + help=_("Directory in which packaged file will be put")) > + parser.add_option("-d", "--debug", action="store_true", dest="debug", > + help=_("Print debugging information")) > + > + (options,args) = parser.parse_args() > + if len(args) < 1: > + parser.error(_("You need to provide an image XML descriptor")) > + options.image = args[0] > + > + return options > + > +def main(): > + options = parse_args() > + cli.setupLogging("virt-pack", options.debug) > + image = virtinst.ImageParser.parse_file(os.path.abspath(options.image)) > + if image.name is None or image.version is None: > + print >> sys.stderr, _("The image descriptor must contain name and version") > + valid = False > + > + if options.output is None: > + options.output = os.path.join(image.base, "..") > + > + pkg = Package(image) > + try: > + pkg.add_image_files() > + except PackageException, e: > + print >> sys.stderr, _("Validation failed: %s"), e > + return 1 > + > + try: > + pkg.make_vmx_files() > + pkg.pack(options.output) > + except PackageException, e: > + print >> sys.stderr, _("Packaging failed: %s") % e > + return 1 > + > +if __name__ == "__main__": > + main() > + From berrange at redhat.com Fri Jun 13 20:42:51 2008 From: berrange at redhat.com (Daniel P. Berrange) Date: Fri, 13 Jun 2008 21:42:51 +0100 Subject: [et-mgmt-tools] virt-manager new behavior: app wont close if details window present In-Reply-To: <4852D7FE.5040608@redhat.com> References: <4852D7FE.5040608@redhat.com> Message-ID: <20080613204251.GA24961@redhat.com> On Fri, Jun 13, 2008 at 04:26:38PM -0400, Cole Robinson wrote: > Hi all, > > Just a heads up that I've just committed some changes to virt-manager > that alter default behavior. Previously, if the 'Manager' window was > closed, the entire app would shutdown. This is not all that desirable > as a typical user might just want console access to a VM or two, not > requiring the Manager to be present. If running unprivileged you also ought to just be able to select virt manager from the applications menu, and it should re-display the main manage window via the magic of DBus. > The changes keep the app running as long as either the Manager or a > Details/Console window is visible. Menu buttons were also added to > the Details view to return to the Manager if it has been closed, and > antother to fully quit the app regardless of open windows. I posted > a screenshot of the new menu items for reference. That looks good Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From berrange at redhat.com Fri Jun 13 20:44:44 2008 From: berrange at redhat.com (Daniel P. Berrange) Date: Fri, 13 Jun 2008 21:44:44 +0100 Subject: [et-mgmt-tools] [PATCH] virt-inst Package an image for VMware distribution In-Reply-To: <4852DA4C.9030400@redhat.com> References: <484058D2.6030006@redhat.com> <48497639.8090108@redhat.com> <484D6391.5060800@redhat.com> <484EC1BD.7010507@redhat.com> <484ED675.5070608@redhat.com> <4852DA4C.9030400@redhat.com> Message-ID: <20080613204444.GB24961@redhat.com> On Fri, Jun 13, 2008 at 04:36:28PM -0400, Cole Robinson wrote: > Joey Boggs wrote: > > Made more updates based on comments. > > > > This version looks good to me. If Dan is fine with it as well i'll commit it. Yes, this looks ok to me. Though I'd like to see a man page written in POD format too.... Regards, Daniel. -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From tobert at gmail.com Sat Jun 14 20:04:18 2008 From: tobert at gmail.com (Al Tobey) Date: Sat, 14 Jun 2008 13:04:18 -0700 Subject: [et-mgmt-tools] Teaching cobbler about images & power In-Reply-To: <4852859C.10405@redhat.com> References: <4852859C.10405@redhat.com> Message-ID: <5ac7acb10806141304n15fa1cadp3a9c498fa2a57aed@mail.gmail.com> On Fri, Jun 13, 2008 at 7:35 AM, Michael DeHaan wrote: > These are two things I want to look at doing soon. > > (A) > The image use case: > > We're already using Cobbler to help manage DHCP, DNS, PXE trees, and > abstract out all of the glue that holds the OS's together. One thing that > it doesn't do though, is have a good way to deploy images to physical > machines (cloning). Kickstart is pretty flexible, I like it better, but I > know that doesn't solve all the problems of deploying "that other OS" and so > forth. Images are also important for the appliance space, and we'll also be > able to eventually use the same kind of image database for virt images > depending on how we play our cards. > > So, since things like udpcast allow network deployment of the "target" boot > image, this seems like it would be easy to do something like. > > cobbler system add --name=foo --clone=this-image-target # syntax > completely made up at this point A "nice to have" for this would be that it be modular enough that the clone functionality could be customized to do NetApp snap clones, LVM snapshots, and similar. Obviously, Cobbler won't be able to support every device and vendor, but I'm sure with the capability there, it'll get used. I'd say LVM snapshots would be a good place to start, then qemu qcow2 (not supported by Xen, but is by KVM/Qemu). Once there's more than one module, it should be simple enough to add NetApp/HP EVA/EqualLogic/EMC CX/etc.. -Al From tobert at gmail.com Sat Jun 14 20:08:39 2008 From: tobert at gmail.com (Al Tobey) Date: Sat, 14 Jun 2008 13:08:39 -0700 Subject: [et-mgmt-tools] [patch] templatize Cobbler's system entries in dhcpd.conf Message-ID: <5ac7acb10806141308j1d62f149u723b1d1555aa1b59@mail.gmail.com> Michael, The attached patch moves DHCP system entries from manage_isc.py to /etc/cobbler/dhcp.template. I have it passing down a lot more data than is probably necessary, but then again, when imaging comes around, the profile/distro data may end up being more useful than it is right now. I've only been able to lightly test this, but it should get things pretty close. -Al Tobey -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-templatize-ISC-dhcp-host-entries-in-dhcpd.conf.patch Type: application/octet-stream Size: 7311 bytes Desc: not available URL: From lhaig at haigmail.com Mon Jun 16 08:38:01 2008 From: lhaig at haigmail.com (lhaig-haigmail.com) Date: Mon, 16 Jun 2008 04:38:01 -0400 Subject: [et-mgmt-tools] Problem with "hang" on AMD chip In-Reply-To: <4852CF85.4050109@redhat.com> References: <0ed58e4d5cc916350a4deaff38f252cb@haigmail.com> <4852CF85.4050109@redhat.com> Message-ID: <70766d781e0a07ed7aa89ea19e10c972@haigmail.com> Hey guys, Thanks Apologies for wasted bytes Lance On Fri, 13 Jun 2008 15:50:29 -0400, Cole Robinson wrote: > lhaig-haigmail.com wrote: >> Hi, >> >> I just tried using kvm on my Dell AMD64 laptop and virt-manager. I can >> create a vm quite fine and I can start it. >> Booting of an iso file the vm boots and starts set-up but then hangs the >> whole machine. no keyboard mouse access. >> >> You can still ping the host but not connect via ssh. >> >> Other machines running the same os "ForesightLinux" do not have this >> problem. >> >> How can I start debugging this? >> >> Thanks >> >> Lance >> > > This isn't really the correct mailing list for this type of problem. My > recommendation would be to pull down the latest upstream kvm release and > see if you can reproduce the problem there, and if so take it to one of > the upstream kvm lists (http://kvm.qumranet.com/kvmwiki/Lists%2C_IRC). > > - Cole From mdehaan at redhat.com Mon Jun 16 14:24:34 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Mon, 16 Jun 2008 10:24:34 -0400 Subject: [et-mgmt-tools] Re: [patch] templatize Cobbler's system entries in dhcpd.conf In-Reply-To: <5ac7acb10806141308j1d62f149u723b1d1555aa1b59@mail.gmail.com> References: <5ac7acb10806141308j1d62f149u723b1d1555aa1b59@mail.gmail.com> Message-ID: <485677A2.9070209@redhat.com> Al Tobey wrote: > Michael, > > The attached patch moves DHCP system entries from manage_isc.py to > /etc/cobbler/dhcp.template. I have it passing down a lot more data > than is probably necessary, but then again, when imaging comes around, > the profile/distro data may end up being more useful than it is right > now. I've only been able to lightly test this, but it should get > things pretty close. > > -Al Tobey > Sharp! I like the way how this streamlines things out. I'm going to go ahead and apply this to the devel branch, comments/testing from others are welcome (especially as I'm mostly going to be gone for Summit/FudCON this week). One potential warning note is that people who do upgrade to this version will have to pay attention to their /etc/cobbler/dhcp.template.rpmnew otherwise things will stop working for them. I think that's reasonable given the flexibility this allows. One of the other things I want to do in the future is to make the yum config files fully dynamic and Cheetah powered, so we'll be able to drive even more from templates (so we'll be even more customizable there as well). Thanks! --Michael From jboggs at redhat.com Mon Jun 16 20:30:22 2008 From: jboggs at redhat.com (Joey Boggs) Date: Mon, 16 Jun 2008 16:30:22 -0400 Subject: [et-mgmt-tools] [PATCH] virt-inst Package an image for VMware distribution In-Reply-To: <20080613204444.GB24961@redhat.com> References: <484058D2.6030006@redhat.com> <48497639.8090108@redhat.com> <484D6391.5060800@redhat.com> <484EC1BD.7010507@redhat.com> <484ED675.5070608@redhat.com> <4852DA4C.9030400@redhat.com> <20080613204444.GB24961@redhat.com> Message-ID: <4856CD5E.2050803@redhat.com> attached virt-pack documentation in pod format. If it's missing anything please let me know. Daniel P. Berrange wrote: > On Fri, Jun 13, 2008 at 04:36:28PM -0400, Cole Robinson wrote: > >> Joey Boggs wrote: >> >>> Made more updates based on comments. >>> >>> >> This version looks good to me. If Dan is fine with it as well i'll commit it. >> > > Yes, this looks ok to me. Though I'd like to see a man page written > in POD format too.... > > Regards, > Daniel. > -------------- next part -------------- A non-text attachment was scrubbed... Name: virt-pack-pod.patch Type: text/x-patch Size: 2271 bytes Desc: not available URL: From fj7025cf at aa.jp.fujitsu.com Tue Jun 17 05:54:48 2008 From: fj7025cf at aa.jp.fujitsu.com (Hiroyuki Kaguchi) Date: Tue, 17 Jun 2008 14:54:48 +0900 Subject: [et-mgmt-tools] [PATCH][virt-viewer] Add error message when it connects to the stopping domain. In-Reply-To: <483E42BE.9040907@aa.jp.fujitsu.com> References: <483E42BE.9040907@aa.jp.fujitsu.com> Message-ID: <485751A8.9050102@aa.jp.fujitsu.com> On 2008/05/29 14:44, Hiroyuki Kaguchi wrote: > Hi, > > When the guest domain is stopping, virt-viewer exits without error message. > The patch adds error message when it fails to connect stopping domain. > > Thanks, > Signed-off-by: Hiroyuki Kaguchi > > diff -r 5299a3aaebb5 src/main.c > --- a/src/main.c Sun Apr 27 23:41:26 2008 -0400 > +++ b/src/main.c Thu May 29 13:58:00 2008 +0900 > @@ -785,6 +785,7 @@ viewer_start (const char *uri, const cha > GtkWidget *vnc; > virConnectPtr conn = NULL; > virDomainPtr dom = NULL; > + virDomainInfo domInfo; > char *host = NULL; > char *vncport = NULL; > char *transport = NULL; > @@ -813,11 +814,24 @@ viewer_start (const char *uri, const cha > usleep(500*1000); > } while (!dom); > > - viewer_extract_vnc_graphics(dom, &vncport); > - if (!vncport && !waitvnc) { > - fprintf(stderr, "unable to find vnc graphics for %s\n", name); > - return 4; > + if (virDomainGetInfo(dom, &domInfo) != 0) { > + fprintf(stderr, "unable to get information for %s\n", name); > + return 6; > } > + > + if (domInfo.state == VIR_DOMAIN_SHUTOFF && !waitvnc) { > + fprintf(stderr, "%s is not running\n", name); > + return 7; > + } > + > + if (domInfo.state != VIR_DOMAIN_SHUTOFF) { > + viewer_extract_vnc_graphics(dom, &vncport); > + if (!vncport) { > + fprintf(stderr, "unable to find vnc graphics for %s\n", name); > + return 4; > + } > + } > + > if (!vncport) { > virDomainFree(dom); > usleep(300*1000); > Could you apply this patch if there is no problem in this patch, Dan ? Thanks, Hiroyuki Kaguchi From sakaia at jp.fujitsu.com Tue Jun 17 06:15:28 2008 From: sakaia at jp.fujitsu.com (Atsushi SAKAI) Date: Tue, 17 Jun 2008 15:15:28 +0900 Subject: [et-mgmt-tools] [PATCH][virt-viewer] Add error message when itconnects to the stopping domain. In-Reply-To: <485751A8.9050102@aa.jp.fujitsu.com> References: <485751A8.9050102@aa.jp.fujitsu.com> Message-ID: <200806170615.m5H6FUAL023996@fjmscan503.ms.jp.fujitsu.com> Hi, Dan Please review this patch, since this is virt-viewer issue. Thanks Atsushi SAKAI Hiroyuki Kaguchi wrote: > On 2008/05/29 14:44, Hiroyuki Kaguchi wrote: > > Hi, > > > > When the guest domain is stopping, virt-viewer exits without error message. > > The patch adds error message when it fails to connect stopping domain. > > > > Thanks, > > Signed-off-by: Hiroyuki Kaguchi > > > > diff -r 5299a3aaebb5 src/main.c > > --- a/src/main.c Sun Apr 27 23:41:26 2008 -0400 > > +++ b/src/main.c Thu May 29 13:58:00 2008 +0900 > > @@ -785,6 +785,7 @@ viewer_start (const char *uri, const cha > > GtkWidget *vnc; > > virConnectPtr conn = NULL; > > virDomainPtr dom = NULL; > > + virDomainInfo domInfo; > > char *host = NULL; > > char *vncport = NULL; > > char *transport = NULL; > > @@ -813,11 +814,24 @@ viewer_start (const char *uri, const cha > > usleep(500*1000); > > } while (!dom); > > > > - viewer_extract_vnc_graphics(dom, &vncport); > > - if (!vncport && !waitvnc) { > > - fprintf(stderr, "unable to find vnc graphics for %s\n", name); > > - return 4; > > + if (virDomainGetInfo(dom, &domInfo) != 0) { > > + fprintf(stderr, "unable to get information for %s\n", name); > > + return 6; > > } > > + > > + if (domInfo.state == VIR_DOMAIN_SHUTOFF && !waitvnc) { > > + fprintf(stderr, "%s is not running\n", name); > > + return 7; > > + } > > + > > + if (domInfo.state != VIR_DOMAIN_SHUTOFF) { > > + viewer_extract_vnc_graphics(dom, &vncport); > > + if (!vncport) { > > + fprintf(stderr, "unable to find vnc graphics for %s\n", name); > > + return 4; > > + } > > + } > > + > > if (!vncport) { > > virDomainFree(dom); > > usleep(300*1000); > > > > Could you apply this patch if there is no problem in this patch, Dan ? > > Thanks, > Hiroyuki Kaguchi > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From berrange at redhat.com Tue Jun 17 08:03:42 2008 From: berrange at redhat.com (Daniel P. Berrange) Date: Tue, 17 Jun 2008 09:03:42 +0100 Subject: [et-mgmt-tools] [PATCH][virt-viewer] Add error message when it connects to the stopping domain. In-Reply-To: <483E42BE.9040907@aa.jp.fujitsu.com> References: <483E42BE.9040907@aa.jp.fujitsu.com> Message-ID: <20080617080342.GA23913@redhat.com> On Thu, May 29, 2008 at 02:44:30PM +0900, Hiroyuki Kaguchi wrote: > Hi, > > When the guest domain is stopping, virt-viewer exits without error message. > The patch adds error message when it fails to connect stopping domain. > > Thanks, > Signed-off-by: Hiroyuki Kaguchi Sorry for delay in applying this - its committed now. Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From epicfailcompany at yahoo.com Tue Jun 17 13:01:10 2008 From: epicfailcompany at yahoo.com (Donnie M.) Date: Tue, 17 Jun 2008 06:01:10 -0700 (PDT) Subject: [et-mgmt-tools] Just upgraded cobbler to 1.0.2 from epel [ issues ] Message-ID: <259666.81493.qm@web46306.mail.sp1.yahoo.com> Hello, ? something crazy just happened when I upgraded from cobbler server 0.802, when I did a 'cobbler sync' and 'cobbler reposync' all of my kickstart files in ~/cobbler/kickstarts dissapeared as well as the /profile/ dir, and ~/profiles_list file. is this part of upgrading via rpm? ? In the previous versions of cobbler <0.8x when you import media cobbler would create a simple kickstart and *.repo file for the distro. I see that the repo files still get created (good!) but the kickstart generation seems changed. ? Can anyone confirm these changes? Or should I at this point wipe my cobbler upgrade and start from scratch? -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom at ng23.net Tue Jun 17 13:06:28 2008 From: tom at ng23.net (Tom Brown) Date: Tue, 17 Jun 2008 14:06:28 +0100 Subject: [et-mgmt-tools] Just upgraded cobbler to 1.0.2 from epel [ issues ] In-Reply-To: <259666.81493.qm@web46306.mail.sp1.yahoo.com> References: <259666.81493.qm@web46306.mail.sp1.yahoo.com> Message-ID: <4857B6D4.4080201@ng23.net> > Hello, > > > > something crazy just happened when I upgraded from cobbler server 0.802, > > when I did a 'cobbler sync' and 'cobbler reposync' all of my kickstart > files in ~/cobbler/kickstarts dissapeared as well as the /profile/ > dir, and ~/profiles_list file. is this part of upgrading via rpm? > > > > In the previous versions of cobbler <0.8x when you import media > cobbler would create a simple kickstart and *.repo file for the > distro. I see that the repo files still get created (good!) but the > kickstart generation seems changed. > > > > Can anyone confirm these changes? Or should I at this point wipe my > cobbler upgrade and start from scratch? > > kickstarts are now generated on the fly From hyclak at math.ohiou.edu Tue Jun 17 13:06:55 2008 From: hyclak at math.ohiou.edu (Matt Hyclak) Date: Tue, 17 Jun 2008 09:06:55 -0400 Subject: [et-mgmt-tools] Just upgraded cobbler to 1.0.2 from epel [ issues ] In-Reply-To: <259666.81493.qm@web46306.mail.sp1.yahoo.com> References: <259666.81493.qm@web46306.mail.sp1.yahoo.com> Message-ID: <20080617130655.GA1414@math.ohiou.edu> On Tue, Jun 17, 2008 at 06:01:10AM -0700, Donnie M. enlightened us: > ? > something crazy just happened when I upgraded from cobbler server 0.802, > when I did a 'cobbler sync' and 'cobbler reposync' all of my kickstart files in ~/cobbler/kickstarts dissapeared as well as the /profile/ dir, and ~/profiles_list file. is this part of upgrading via rpm? > ? > In the previous versions of cobbler <0.8x when you import media cobbler would create a simple kickstart and *.repo file for the distro. I see that the repo files still get created (good!) but the kickstart generation seems changed. > ? > Can anyone confirm these changes? Or should I at this point wipe my cobbler upgrade and start from scratch? > > Kickstart files are now dynamically created, so this is expected behavior. Michael gave instructions in a message to this list a week or two ago regarding the URL to get a specific kickstart file. I'd check the archives if I were you. Matt -- Matt Hyclak Department of Mathematics Department of Social Work Ohio University (740) 593-1263 From epicfailcompany at yahoo.com Tue Jun 17 13:12:25 2008 From: epicfailcompany at yahoo.com (Donnie M.) Date: Tue, 17 Jun 2008 06:12:25 -0700 (PDT) Subject: [et-mgmt-tools] Just upgraded cobbler to 1.0.2 from epel [ issues ] In-Reply-To: <4857B6D4.4080201@ng23.net> Message-ID: <310674.38945.qm@web46307.mail.sp1.yahoo.com> Ahh, I see ? */me should read the release notes more carefully next time* Thank you for your response, I have 1 more question. ? How can I 'edit' this information directly? ? ? ? --- On Tue, 6/17/08, Tom Brown wrote: From: Tom Brown Subject: Re: [et-mgmt-tools] Just upgraded cobbler to 1.0.2 from epel [ issues ] To: epicfailcompany at yahoo.com, "Fedora/Linux Management Tools" Date: Tuesday, June 17, 2008, 1:06 PM > Hello, > > > > something crazy just happened when I upgraded from cobbler server 0.802, > > when I did a 'cobbler sync' and 'cobbler reposync' all of my kickstart > files in ~/cobbler/kickstarts dissapeared as well as the /profile/ > dir, and ~/profiles_list file. is this part of upgrading via rpm? > > > > In the previous versions of cobbler <0.8x when you import media > cobbler would create a simple kickstart and *.repo file for the > distro. I see that the repo files still get created (good!) but the > kickstart generation seems changed. > > > > Can anyone confirm these changes? Or should I at this point wipe my > cobbler upgrade and start from scratch? > > kickstarts are now generated on the fly -------------- next part -------------- An HTML attachment was scrubbed... URL: From epicfailcompany at yahoo.com Tue Jun 17 13:12:26 2008 From: epicfailcompany at yahoo.com (Donnie M.) Date: Tue, 17 Jun 2008 06:12:26 -0700 (PDT) Subject: [et-mgmt-tools] Just upgraded cobbler to 1.0.2 from epel [ issues ] In-Reply-To: <4857B6D4.4080201@ng23.net> Message-ID: <164507.96050.qm@web46306.mail.sp1.yahoo.com> Ahh, I see ? */me should read the release notes more carefully next time* Thank you for your response, I have 1 more question. ? How can I 'edit' this information directly? ? ? ? --- On Tue, 6/17/08, Tom Brown wrote: From: Tom Brown Subject: Re: [et-mgmt-tools] Just upgraded cobbler to 1.0.2 from epel [ issues ] To: epicfailcompany at yahoo.com, "Fedora/Linux Management Tools" Date: Tuesday, June 17, 2008, 1:06 PM > Hello, > > > > something crazy just happened when I upgraded from cobbler server 0.802, > > when I did a 'cobbler sync' and 'cobbler reposync' all of my kickstart > files in ~/cobbler/kickstarts dissapeared as well as the /profile/ > dir, and ~/profiles_list file. is this part of upgrading via rpm? > > > > In the previous versions of cobbler <0.8x when you import media > cobbler would create a simple kickstart and *.repo file for the > distro. I see that the repo files still get created (good!) but the > kickstart generation seems changed. > > > > Can anyone confirm these changes? Or should I at this point wipe my > cobbler upgrade and start from scratch? > > kickstarts are now generated on the fly -------------- next part -------------- An HTML attachment was scrubbed... URL: From crobinso at redhat.com Tue Jun 17 15:48:32 2008 From: crobinso at redhat.com (Cole Robinson) Date: Tue, 17 Jun 2008 11:48:32 -0400 Subject: [et-mgmt-tools] [PATCH] virt-inst Package an image for VMware distribution In-Reply-To: <4856CD5E.2050803@redhat.com> References: <484058D2.6030006@redhat.com> <48497639.8090108@redhat.com> <484D6391.5060800@redhat.com> <484EC1BD.7010507@redhat.com> <484ED675.5070608@redhat.com> <4852DA4C.9030400@redhat.com> <20080613204444.GB24961@redhat.com> <4856CD5E.2050803@redhat.com> Message-ID: <4857DCD0.5060107@redhat.com> Joey Boggs wrote: > attached virt-pack documentation in pod format. If it's missing anything > please let me know. > Excellent. I've committed the docs and the virt-pack script upstream: http://hg.et.redhat.com/virt/applications/virtinst--devel?cs=a8177661c7b0 http://hg.et.redhat.com/virt/applications/virtinst--devel?cs=5306b7f36816 Thanks, Cole From epicfailcompany at yahoo.com Tue Jun 17 15:21:15 2008 From: epicfailcompany at yahoo.com (Donnie M.) Date: Tue, 17 Jun 2008 08:21:15 -0700 (PDT) Subject: [et-mgmt-tools] Just upgraded cobbler to 1.0.2 from epel [ issues ] In-Reply-To: <4857B6D4.4080201@ng23.net> Message-ID: <802163.77376.qm@web46314.mail.sp1.yahoo.com> Ok, I have a bit more detailed information, I do apologize for the lack of substance in my last email: ? cobbler version: 1.0.2 (upgraded from 0.8) kernel: 2.6.18-53.1.14.el5 OS: RHEL 5.1 ? when I go to the url of one of my profiles (http://server1/cblr/svc/op/ks/profile/RHEL4.6-32bit-i386?for example) I get the following in my web browser: ? ====== START ====== ? Mod_python error: "PythonHandler services" Traceback (most recent call last): ? File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch ??? result = object(req) ? File "/var/www/cobbler/svc/services.py", line 82, in handler ??? content = func( **form ) ? File "/usr/lib/python2.4/site-packages/cobbler/services.py", line 70, in ks ??? data = self.remote.generate_kickstart(profile,system,REMOTE_ADDR,REMOTE_MAC) ? File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__ ??? return self.__send(self.__name, args) ? File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request ??? verbose=self.__verbose ? File "/usr/lib64/python2.4/xmlrpclib.py", line 1147, in request ??? return self._parse_response(h.getfile(), sock) ? File "/usr/lib64/python2.4/xmlrpclib.py", line 1286, in _parse_response ??? return u.close() ? File "/usr/lib64/python2.4/xmlrpclib.py", line 744, in close ??? raise Fault(**self._stack[0]) Fault: ? ====== END ====== ? If more information is needed please let me know! I haven't upgraded cobbler in a very long time, it has been very rock solid and well worked in my datacenter, - up to this point. :-( ? ? ? --- On Tue, 6/17/08, Tom Brown wrote: From: Tom Brown Subject: Re: [et-mgmt-tools] Just upgraded cobbler to 1.0.2 from epel [ issues ] To: epicfailcompany at yahoo.com, "Fedora/Linux Management Tools" Date: Tuesday, June 17, 2008, 1:06 PM > Hello, > > > > something crazy just happened when I upgraded from cobbler server 0.802, > > when I did a 'cobbler sync' and 'cobbler reposync' all of my kickstart > files in ~/cobbler/kickstarts dissapeared as well as the /profile/ > dir, and ~/profiles_list file. is this part of upgrading via rpm? > > > > In the previous versions of cobbler <0.8x when you import media > cobbler would create a simple kickstart and *.repo file for the > distro. I see that the repo files still get created (good!) but the > kickstart generation seems changed. > > > > Can anyone confirm these changes? Or should I at this point wipe my > cobbler upgrade and start from scratch? > > kickstarts are now generated on the fly -------------- next part -------------- An HTML attachment was scrubbed... URL: From leon at tim-online.nl Tue Jun 17 21:36:07 2008 From: leon at tim-online.nl (Leon Bogaert) Date: Tue, 17 Jun 2008 23:36:07 +0200 Subject: [et-mgmt-tools] virt-install: location for ubuntu ftp In-Reply-To: <0A02838AFAB4AA41A421A9D09800FE66B2ABFB83FA@server-tim.tim-online.nl> References: <0A02838AFAB4AA41A421A9D09800FE66B2ABFB83FA@server-tim.tim-online.nl> Message-ID: <0A02838AFAB4AA41A421A9D09800FE66B2ABFB83FB@server-tim.tim-online.nl> Hi all, I'm trying to install ubuntu via virt-install. When virt-install asks for a location I want it to install ubuntu via ftp. I've tried a lot of ftp url's from ftp://ftp.tudelft.nl/pub/Linux/archive.ubuntu.com/ But everytime I get an error like this one: http://pastie.org/216792 What would be the right url to use? I've tried setting the os type and variant (linux/ubuntu), but that didn't make a difference. Thanks in advance! Leon From robin-lists at robinbowes.com Tue Jun 17 23:58:17 2008 From: robin-lists at robinbowes.com (Robin Bowes) Date: Wed, 18 Jun 2008 00:58:17 +0100 Subject: [et-mgmt-tools] Re: Just upgraded cobbler to 1.0.2 from epel [ issues ] In-Reply-To: <802163.77376.qm@web46314.mail.sp1.yahoo.com> References: <4857B6D4.4080201@ng23.net> <802163.77376.qm@web46314.mail.sp1.yahoo.com> Message-ID: Donnie M. wrote: > when I go to the url of one of my profiles > (http://server1/cblr/svc/op/ks/profile/RHEL4.6-32bit-i386 for example) I > get the following in my web browser: > ====== START ====== > > Mod_python error: "PythonHandler services" > > Traceback (most recent call last): > > File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line > 299, in HandlerDispatch > result = object(req) I had a similar error earlier today. Restarting apache fixed it. R. From epicfailcompany at yahoo.com Wed Jun 18 00:31:16 2008 From: epicfailcompany at yahoo.com (Donnie M.) Date: Tue, 17 Jun 2008 17:31:16 -0700 (PDT) Subject: [et-mgmt-tools] Re: Just upgraded cobbler to 1.0.2 from epel [ issues ] In-Reply-To: <4857B6D4.4080201@ng23.net> Message-ID: <656618.90156.qm@web46301.mail.sp1.yahoo.com> Donnie M. wrote: when I go to the url of one of my profiles (http://server1/cblr/svc/op/ks/profile/RHEL4.6-32bit-i386 for example) I get the following in my web browser: ====== START ====== Mod_python error: "PythonHandler services" Traceback (most recent call last): File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch result = object(req) I had a similar error earlier today. Restarting apache fixed it.??Unfortunately that did not solve the issue, all of those python errors are still there.I stopped, then started apache, then I did the same for cobblerd daemon as well. No change.?What bugs me out is that at the end of the traceback, the fault space is empty. I have no idea how one would debug this but I am more than happy to help the developers get to the bottom of this. This is a stock 5.1 machine with minor updates.?????Mod_python error: "PythonHandler services" Traceback (most recent call last): File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch result = object(req) File "/var/www/cobbler/svc/services.py", line 82, in handler content = func( **form ) File "/usr/lib/python2.4/site-packages/cobbler/services.py", line 70, in ks data = self.remote.generate_kickstart(profile,system,REMOTE_ADDR,REMOTE_MAC) File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__ return self.__send(self.__name, args) File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request verbose=self.__verbose File "/usr/lib64/python2.4/xmlrpclib.py", line 1147, in request return self._parse_response(h.getfile(), sock) File "/usr/lib64/python2.4/xmlrpclib.py", line 1286, in _parse_response return u.close() File "/usr/lib64/python2.4/xmlrpclib.py", line 744, in close raise Fault(**self._stack[0]) Fault: ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From fj7025cf at aa.jp.fujitsu.com Wed Jun 18 04:54:19 2008 From: fj7025cf at aa.jp.fujitsu.com (Hiroyuki Kaguchi) Date: Wed, 18 Jun 2008 13:54:19 +0900 Subject: [et-mgmt-tools] [PATCH] Enable to send F10 key to the guest OS. In-Reply-To: <48363446.8020601@aa.jp.fujitsu.com> References: <48363123.605@aa.jp.fujitsu.com> <48363446.8020601@aa.jp.fujitsu.com> Message-ID: <485894FB.8000007@aa.jp.fujitsu.com> On 2008/05/23 12:04, Hiroyuki Kaguchi wrote: > On 2008/05/23 11:51, Hiroyuki Kaguchi wrote: >> The F10 key is assigned as the accelerator of the menu bar in the OS(Windows or >> Linux). >> On this account it is necessary to send the F10 key to the guest OS. >> However, with the existing specifications of virt-viewer, the F10 key is >> assigned to the accelerator >> of the menu bar of virt-viewer and we cannot send the F10 key to the guest OS. >> So, I change virt-viewer to be able to send F10 key to the guest OS when >> virt-viewer grabs the keyboard. > > I forgot to attach the patch. > I attach it. > Hi, Dan Please review this patch. Thanks Hiroyuki Kaguchi From bleanhar at redhat.com Wed Jun 18 13:22:53 2008 From: bleanhar at redhat.com (Brenton Leanhardt) Date: Wed, 18 Jun 2008 09:22:53 -0400 Subject: [et-mgmt-tools] Help debugging Cobbler's syslog support Message-ID: <20080618132253.GJ22392@tumbolia-jboss-dev.usersys.redhat.com> Yesterday I hit some problem with a new kickstart. While trying to debug the issue I realized Cobbler's syslog support was no longer working for me. Unfortunately I don't know when it stopped working, only that it was indeed working for me a few weeks ago. Basically nothing shows up under /var/log/cobbler/{kicklog,syslog}. My setup: Version: Cobbler 1.1.0 (built from git) Fedora 8 using rsyslog Kernel: 2.6.21-2950.fc8xen #1 SMP Tue Oct 23 12:24:34 EDT 2007 i686 i686 i386 GNU/Linux No firewall Cobbler syslog port: 25150 (It's indeed listening on all interfaces) I also couldn't figure out what virsh command would show me the kernel_options for my running guest. That would help me verify it's using the correct hostname/port. If anyone has any idea of where else I could look to debug this I would greatly appreciate it. --Brenton From crobinso at redhat.com Wed Jun 18 13:55:32 2008 From: crobinso at redhat.com (Cole Robinson) Date: Wed, 18 Jun 2008 09:55:32 -0400 Subject: [et-mgmt-tools] virt-install: location for ubuntu ftp In-Reply-To: <0A02838AFAB4AA41A421A9D09800FE66B2ABFB83FB@server-tim.tim-online.nl> References: <0A02838AFAB4AA41A421A9D09800FE66B2ABFB83FA@server-tim.tim-online.nl> <0A02838AFAB4AA41A421A9D09800FE66B2ABFB83FB@server-tim.tim-online.nl> Message-ID: <485913D4.6020605@redhat.com> Leon Bogaert wrote: > Hi all, > > I'm trying to install ubuntu via virt-install. When virt-install asks for a location I want it to install ubuntu via ftp. I've tried a lot of ftp url's from ftp://ftp.tudelft.nl/pub/Linux/archive.ubuntu.com/ > But everytime I get an error like this one: http://pastie.org/216792 > > What would be the right url to use? I've tried setting the os type and variant (linux/ubuntu), but that didn't make a difference. > > Thanks in advance! > > Leon > What is the full command line you are using? From the looks of the error message you passed ftp://ftp.tudelft.nl/pub/Linux/archive.ubuntu.com/ as the distro location which isn't valid. There should certainly be a nicer error message though, but this section of the code is a mess anyways and really needs to be slimmed down. Also I assume you are trying to install a qemu/kvm guest? Thanks, Cole From lists at davehatton.it Wed Jun 18 13:58:23 2008 From: lists at davehatton.it (Dave Hatton) Date: Wed, 18 Jun 2008 14:58:23 +0100 Subject: [et-mgmt-tools] [PATCH] cobbler buildiso add --systems option and fix --profiles selection. Message-ID: <4859147F.9050000@davehatton.it> The attached patch is for the "cobbler buildiso" command 1. It fixes the --profile option so that you can now *really* specify which profiles you wish to include in the kickstart.iso 2. It adds a --systems option to allow you add specific systems to the kickstart.iso What is the process for having this reviewed and if suitable, merged into cobbler? Regards Daveh -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: cli_misc.py.patch URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: action_buildiso.py.patch URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: api.py.patch URL: From jim at rossberry.com Wed Jun 18 22:19:13 2008 From: jim at rossberry.com (Jim Wildman) Date: Wed, 18 Jun 2008 18:19:13 -0400 (EDT) Subject: [et-mgmt-tools] [PATCH] cobbler buildiso add --systems option and fix --profiles selection. In-Reply-To: <4859147F.9050000@davehatton.it> References: <4859147F.9050000@davehatton.it> Message-ID: On Wed, 18 Jun 2008, Dave Hatton wrote: > The attached patch is for the "cobbler buildiso" command > 1. It fixes the --profile option so that you can now *really* specify which > profiles you wish to include in the kickstart.iso > 2. It adds a --systems option to allow you add specific systems to the > kickstart.iso > > What is the process for having this reviewed and if suitable, merged into > cobbler? > Probably starts with waiting for Mike to get back from the Summit in Boston. ------------------------------------------------------------------------ Jim Wildman, CISSP, RHCE jim at rossberry.com http://www.rossberry.com "Society in every state is a blessing, but Government, even in its best state, is a necessary evil; in its worst state, an intolerable one." Thomas Paine From dblack at vantage.com Thu Jun 19 19:17:53 2008 From: dblack at vantage.com (Dustin Black) Date: Thu, 19 Jun 2008 15:17:53 -0400 Subject: [et-mgmt-tools] Cobbler BIND DNS management confusion Message-ID: <1213903073.3894.39.camel@dblaptop> I could use some help understanding Cobbler's management of BIND. If I make any changes to the /etc/cobbler/named.template file and run 'cobbler sync', I can clearly see that the changes that I make are implemented in the /etc/named.conf file. Now I've been attempting to create a zone template under a directory created ?per the wiki ManageDns documentation -- /etc/cobbler/zone_templates. I want to create a zone with static A, MX, and CNAME entries that are outside the scope of Cobbler's management for that zone. If I create the zone template and run 'cobbler sync', should I then expect Cobbler to add the zone information to the named.conf file, as well as use the template to create an appropriate zone file under /var/named? This doesn't seem to happen. If I try to add the zone information explicitly to the /etc/cobbler/named.template file, named gives an error when restarting that the /var/named/... zone file doesn't exist. I then thought that maybe Cobbler wouldn't create the named.conf zone entry or the zone file until a Cobbler system entry existed for a host in the domain. I created a dummy system with a hostname in the domain in question and ran 'cobbler sync', but still no dice -- no zone entry and no zone file. What more do I need to understand about how this BIND management works? At what point or under what circumstances is the zone information generated? Thanks in advance! From James_Martin at ao.uscourts.gov Thu Jun 19 19:35:13 2008 From: James_Martin at ao.uscourts.gov (James_Martin at ao.uscourts.gov) Date: Thu, 19 Jun 2008 15:35:13 -0400 Subject: [et-mgmt-tools] Cobbler BIND DNS management confusion In-Reply-To: <1213903073.3894.39.camel@dblaptop> References: <1213903073.3894.39.camel@dblaptop> Message-ID: Make sure you have something along the lines of this in your /etc/cobbler/settings file: manage_forward_zones: - 'lab.mycompany.com' James S. Martin, RHCE Contractor Administrative Office of the United States Courts Washington, DC (202) 502-2394 et-mgmt-tools-bounces at redhat.com wrote on 06/19/2008 03:17:53 PM: > Dustin Black > Sent by: et-mgmt-tools-bounces at redhat.com > > 06/19/2008 03:17 PM > > Please respond to > dblack at vantage.com; Please respond to > Fedora/Linux Management Tools > > To > > et-mgmt-tools at redhat.com > > cc > > Subject > > [et-mgmt-tools] Cobbler BIND DNS management confusion > > I could use some help understanding Cobbler's management of BIND. > > If I make any changes to the /etc/cobbler/named.template file and run > 'cobbler sync', I can clearly see that the changes that I make are > implemented in the /etc/named.conf file. > > Now I've been attempting to create a zone template under a directory > created per the wiki ManageDns documentation > -- /etc/cobbler/zone_templates. I want to create a zone with static A, > MX, and CNAME entries that are outside the scope of Cobbler's management > for that zone. If I create the zone template and run 'cobbler sync', > should I then expect Cobbler to add the zone information to the > named.conf file, as well as use the template to create an appropriate > zone file under /var/named? This doesn't seem to happen. > > If I try to add the zone information explicitly to > the /etc/cobbler/named.template file, named gives an error when > restarting that the /var/named/... zone file doesn't exist. > > I then thought that maybe Cobbler wouldn't create the named.conf zone > entry or the zone file until a Cobbler system entry existed for a host > in the domain. I created a dummy system with a hostname in the domain > in question and ran 'cobbler sync', but still no dice -- no zone entry > and no zone file. > > What more do I need to understand about how this BIND management works? > At what point or under what circumstances is the zone information > generated? > > Thanks in advance! > > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From dblack at vantage.com Thu Jun 19 19:43:12 2008 From: dblack at vantage.com (Dustin Black) Date: Thu, 19 Jun 2008 15:43:12 -0400 Subject: [et-mgmt-tools] Cobbler BIND DNS management confusion In-Reply-To: References: <1213903073.3894.39.camel@dblaptop> Message-ID: <1213904592.3894.45.camel@dblaptop> Interesting. I see that there is some convention to the line return and the preceding dash that is both odd and poorly documented. I had: manage_forward_zones: 'domain.com' But changing that to: manage_forward_zones: - 'domain.com' seems to have solved the problem I've been having. Thanks, James! -Dustin Black On Thu, 2008-06-19 at 15:35 -0400, James_Martin at ao.uscourts.gov wrote: > Make sure you have something along the lines of this in your > /etc/cobbler/settings file: > > manage_forward_zones: > - 'lab.mycompany.com' > > > James S. Martin, RHCE > Contractor > Administrative Office of the United States Courts > Washington, DC > (202) 502-2394 > > et-mgmt-tools-bounces at redhat.com wrote on 06/19/2008 03:17:53 PM: > > > Dustin Black > > Sent by: et-mgmt-tools-bounces at redhat.com > > > > 06/19/2008 03:17 PM > > > > Please respond to > > dblack at vantage.com; Please respond to > > Fedora/Linux Management Tools > > > > To > > > > et-mgmt-tools at redhat.com > > > > cc > > > > Subject > > > > [et-mgmt-tools] Cobbler BIND DNS management confusion > > > > I could use some help understanding Cobbler's management of BIND. > > > > If I make any changes to the /etc/cobbler/named.template file and run > > 'cobbler sync', I can clearly see that the changes that I make are > > implemented in the /etc/named.conf file. > > > > Now I've been attempting to create a zone template under a directory > > created per the wiki ManageDns documentation > > -- /etc/cobbler/zone_templates. I want to create a zone with static A, > > MX, and CNAME entries that are outside the scope of Cobbler's management > > for that zone. If I create the zone template and run 'cobbler sync', > > should I then expect Cobbler to add the zone information to the > > named.conf file, as well as use the template to create an appropriate > > zone file under /var/named? This doesn't seem to happen. > > > > If I try to add the zone information explicitly to > > the /etc/cobbler/named.template file, named gives an error when > > restarting that the /var/named/... zone file doesn't exist. > > > > I then thought that maybe Cobbler wouldn't create the named.conf zone > > entry or the zone file until a Cobbler system entry existed for a host > > in the domain. I created a dummy system with a hostname in the domain > > in question and ran 'cobbler sync', but still no dice -- no zone entry > > and no zone file. > > > > What more do I need to understand about how this BIND management works? > > At what point or under what circumstances is the zone information > > generated? > > > > Thanks in advance! > > > > > > _______________________________________________ > > et-mgmt-tools mailing list > > et-mgmt-tools at redhat.com > > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From cmacleod at redhat.com Thu Jun 19 21:16:09 2008 From: cmacleod at redhat.com (Chris MacLeod) Date: Thu, 19 Jun 2008 17:16:09 -0400 Subject: [et-mgmt-tools] Cobbler BIND DNS management confusion In-Reply-To: <1213904592.3894.45.camel@dblaptop> References: <1213903073.3894.39.camel@dblaptop> <1213904592.3894.45.camel@dblaptop> Message-ID: <1B4E5897-472A-4F77-BC18-5EC4D9222BF1@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Jun 19, 2008, at 3:43 PM, Dustin Black wrote: > Interesting. I see that there is some convention to the line return > and > the preceding dash that is both odd and poorly documented. I had: It's YAML. YAML's datastructures are pretty well defined (at least in the terms of yaml they are). foo: blah # is a string variable called 'foo' with the value of 'blah' foo: - blah # is an array called 'foo' with an index[0] whose value is 'blah' > > > manage_forward_zones: 'domain.com' > > But changing that to: > > manage_forward_zones: > - 'domain.com' > > seems to have solved the problem I've been having. > > Thanks, James! > > -Dustin Black > > On Thu, 2008-06-19 at 15:35 -0400, James_Martin at ao.uscourts.gov wrote: >> Make sure you have something along the lines of this in your >> /etc/cobbler/settings file: >> >> manage_forward_zones: >> - 'lab.mycompany.com' >> >> >> James S. Martin, RHCE >> Contractor >> Administrative Office of the United States Courts >> Washington, DC >> (202) 502-2394 >> >> et-mgmt-tools-bounces at redhat.com wrote on 06/19/2008 03:17:53 PM: >> >>> Dustin Black >>> Sent by: et-mgmt-tools-bounces at redhat.com >>> >>> 06/19/2008 03:17 PM >>> >>> Please respond to >>> dblack at vantage.com; Please respond to >>> Fedora/Linux Management Tools >>> >>> To >>> >>> et-mgmt-tools at redhat.com >>> >>> cc >>> >>> Subject >>> >>> [et-mgmt-tools] Cobbler BIND DNS management confusion >>> >>> I could use some help understanding Cobbler's management of BIND. >>> >>> If I make any changes to the /etc/cobbler/named.template file and >>> run >>> 'cobbler sync', I can clearly see that the changes that I make are >>> implemented in the /etc/named.conf file. >>> >>> Now I've been attempting to create a zone template under a directory >>> created per the wiki ManageDns documentation >>> -- /etc/cobbler/zone_templates. I want to create a zone with >>> static A, >>> MX, and CNAME entries that are outside the scope of Cobbler's >>> management >>> for that zone. If I create the zone template and run 'cobbler >>> sync', >>> should I then expect Cobbler to add the zone information to the >>> named.conf file, as well as use the template to create an >>> appropriate >>> zone file under /var/named? This doesn't seem to happen. >>> >>> If I try to add the zone information explicitly to >>> the /etc/cobbler/named.template file, named gives an error when >>> restarting that the /var/named/... zone file doesn't exist. >>> >>> I then thought that maybe Cobbler wouldn't create the named.conf >>> zone >>> entry or the zone file until a Cobbler system entry existed for a >>> host >>> in the domain. I created a dummy system with a hostname in the >>> domain >>> in question and ran 'cobbler sync', but still no dice -- no zone >>> entry >>> and no zone file. >>> >>> What more do I need to understand about how this BIND management >>> works? >>> At what point or under what circumstances is the zone information >>> generated? >>> >>> Thanks in advance! >>> >>> >>> _______________________________________________ >>> et-mgmt-tools mailing list >>> et-mgmt-tools at redhat.com >>> https://www.redhat.com/mailman/listinfo/et-mgmt-tools >> >> >> _______________________________________________ >> et-mgmt-tools mailing list >> et-mgmt-tools at redhat.com >> https://www.redhat.com/mailman/listinfo/et-mgmt-tools > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFIWsyZ0LdOhWiSZUwRAvu7AKCGIYhgKy4qFwGm9UuD8jXUPdVHtQCfWe+S LBIDFTWEKmqGrHBdD5dOGQw= =8YQs -----END PGP SIGNATURE----- From dblack at vantage.com Thu Jun 19 21:58:51 2008 From: dblack at vantage.com (Dustin Black) Date: Thu, 19 Jun 2008 17:58:51 -0400 Subject: [et-mgmt-tools] Cobbler BIND DNS management confusion In-Reply-To: <1B4E5897-472A-4F77-BC18-5EC4D9222BF1@redhat.com> References: <1213903073.3894.39.camel@dblaptop> <1213904592.3894.45.camel@dblaptop> <1B4E5897-472A-4F77-BC18-5EC4D9222BF1@redhat.com> Message-ID: <1213912731.3894.51.camel@dblaptop> On Thu, 2008-06-19 at 17:16 -0400, Chris MacLeod wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > On Jun 19, 2008, at 3:43 PM, Dustin Black wrote: > > > Interesting. I see that there is some convention to the line return > > and > > the preceding dash that is both odd and poorly documented. I had: > > It's YAML. YAML's datastructures are pretty well defined (at least in > the terms of yaml they are). > > foo: blah # is a string variable called 'foo' with the value of 'blah' > foo: > - blah # is an array called 'foo' with an index[0] whose value is > 'blah' > That makes sense, now. I haven't seen anything before now stating that the settings file is YAML. Maybe it should be commented at the top of the file and noted in the Wiki? > > > > > > > > manage_forward_zones: 'domain.com' > > > > But changing that to: > > > > manage_forward_zones: > > - 'domain.com' > > > > seems to have solved the problem I've been having. > > > > Thanks, James! > > > > -Dustin Black > > > > On Thu, 2008-06-19 at 15:35 -0400, James_Martin at ao.uscourts.gov wrote: > >> Make sure you have something along the lines of this in your > >> /etc/cobbler/settings file: > >> > >> manage_forward_zones: > >> - 'lab.mycompany.com' > >> > >> > >> James S. Martin, RHCE > >> Contractor > >> Administrative Office of the United States Courts > >> Washington, DC > >> (202) 502-2394 > >> > >> et-mgmt-tools-bounces at redhat.com wrote on 06/19/2008 03:17:53 PM: > >> > >>> Dustin Black > >>> Sent by: et-mgmt-tools-bounces at redhat.com > >>> > >>> 06/19/2008 03:17 PM > >>> > >>> Please respond to > >>> dblack at vantage.com; Please respond to > >>> Fedora/Linux Management Tools > >>> > >>> To > >>> > >>> et-mgmt-tools at redhat.com > >>> > >>> cc > >>> > >>> Subject > >>> > >>> [et-mgmt-tools] Cobbler BIND DNS management confusion > >>> > >>> I could use some help understanding Cobbler's management of BIND. > >>> > >>> If I make any changes to the /etc/cobbler/named.template file and > >>> run > >>> 'cobbler sync', I can clearly see that the changes that I make are > >>> implemented in the /etc/named.conf file. > >>> > >>> Now I've been attempting to create a zone template under a directory > >>> created per the wiki ManageDns documentation > >>> -- /etc/cobbler/zone_templates. I want to create a zone with > >>> static A, > >>> MX, and CNAME entries that are outside the scope of Cobbler's > >>> management > >>> for that zone. If I create the zone template and run 'cobbler > >>> sync', > >>> should I then expect Cobbler to add the zone information to the > >>> named.conf file, as well as use the template to create an > >>> appropriate > >>> zone file under /var/named? This doesn't seem to happen. > >>> > >>> If I try to add the zone information explicitly to > >>> the /etc/cobbler/named.template file, named gives an error when > >>> restarting that the /var/named/... zone file doesn't exist. > >>> > >>> I then thought that maybe Cobbler wouldn't create the named.conf > >>> zone > >>> entry or the zone file until a Cobbler system entry existed for a > >>> host > >>> in the domain. I created a dummy system with a hostname in the > >>> domain > >>> in question and ran 'cobbler sync', but still no dice -- no zone > >>> entry > >>> and no zone file. > >>> > >>> What more do I need to understand about how this BIND management > >>> works? > >>> At what point or under what circumstances is the zone information > >>> generated? > >>> > >>> Thanks in advance! > >>> > >>> > >>> _______________________________________________ > >>> et-mgmt-tools mailing list > >>> et-mgmt-tools at redhat.com > >>> https://www.redhat.com/mailman/listinfo/et-mgmt-tools > >> > >> > >> _______________________________________________ > >> et-mgmt-tools mailing list > >> et-mgmt-tools at redhat.com > >> https://www.redhat.com/mailman/listinfo/et-mgmt-tools > > > > _______________________________________________ > > et-mgmt-tools mailing list > > et-mgmt-tools at redhat.com > > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.7 (Darwin) > > iD8DBQFIWsyZ0LdOhWiSZUwRAvu7AKCGIYhgKy4qFwGm9UuD8jXUPdVHtQCfWe+S > LBIDFTWEKmqGrHBdD5dOGQw= > =8YQs > -----END PGP SIGNATURE----- From marcmo at foxriver.com Fri Jun 20 20:45:26 2008 From: marcmo at foxriver.com (Marc Mondragon) Date: Fri, 20 Jun 2008 15:45:26 -0500 Subject: [et-mgmt-tools] Care to comment on the future of "Spacewalk" and cobbler? Message-ID: Just saw the announcement and was wondering what was in store for cobbler ... Marc Mondragon Fox River Financial Resources 2100 Enterprise Avenue Geneva, IL 60134 marcmo at foxriver.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdehaan at redhat.com Sat Jun 21 02:33:37 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Fri, 20 Jun 2008 22:33:37 -0400 Subject: [et-mgmt-tools] Care to comment on the future of "Spacewalk" and cobbler? In-Reply-To: References: Message-ID: <485C6881.2070103@redhat.com> Marc Mondragon wrote: > > Just saw the announcement and was wondering what was in store for > cobbler ? > > Marc Mondragon > > Fox River Financial Resources > > 2100 Enterprise Avenue > Geneva, IL 60134 > marcmo at foxriver.com > Sure :) Hotel internet has been slow, so apologies on being invisible over the last few days on the lists/IRC. Random note: You can see the Register picked up the Cobbler talk here... http://www.theregister.co.uk/2008/06/19/red_hat_summit_2008_cobbler/ They are correct in saying that what we're doing with Cobbler, the libvirt tools, Func, and so forth were a major factor in making the decision to open source Satellite. This community *works*. Getting Satellite out there is clearly something we all wanted to do for a long time, and now that it's done, we're /really/ happy to see the excitement growing around it. We've shown we can build a sizable community around developers and admins who want to share and participate in developing common infrastructure. We've shown that the open development models started in Fedora are extremely applicable in the enterprise space (see also EPEL). With Spacewalk, this can grow further. Spacewalk is essentially going to be an aggregrator of all sorts of great OSS management projects in Fedora/EPEL -- we want it to become an interface to make all of these more usable together. Step 1 is Cobbler, Step 2 might be config management, it might be something else ... we're still exploring. I was sitting around at FudCON today with lots of folks, many Satellite users, some not, discussing the future of the project. There's a ton of interest here and it's going to be a good thing. There's already folks interested in diving in there and helping with database support, for instance. People on IRC are already looking at the code and talking about sending in patches. Very good stuff. Cobbler inclusion in Satellite/Spacewalk is definitely in the roadmap, and as I mentioned in my talk (slides up now -- https://fedorahosted.org/cobbler/wiki/PresentationStorage ) we're shooting for early 2009 for having that there. If you want support for Cobbler you'll be able to get that (AFAIK) through purchasing Satellite. In addition, the Satellite GUI's provisioning options, since they will be all Cobbler powered, will work to control cobbler -- so you'll have additional GUI options. Cobbler command line programs will still work as normal in this case too, as will koan. Also if you're an existing Satellite user we want the upgrade process to be transparent. I suspect we won't surface every Cobbler knob and fader in the Spacewalk GUI, though you'll still be able to manipulate cobbler directly in those cases. As myself and the Sat folks have to do some more planning, this is somewhat subject to change. I'll start a thread up on spacewalk-devel shortly. If you're interested, definitely join the mailing lists mentioned at fedorahosted.org/spacewalk and #spacewalk on freenode. Development/planning is going to happen in the open there just like it does here, so if there's something you'd like to see in Spacewalk, please weigh in! So, what about stand alone Cobbler? Cobbler as a project will be continuing on as usual and continuing it's quest for dominance :) You won't need to install Spacewalk to use it, as there are other applications (ovirt, possibly test tools, etc) that will want to have a provisioning service component -- Cobbler is going to be that component. Does it go away? No. Does it become harder to use? No. More dependencies? Also no :) It's all good! I suspect there will be a few Cobbler RFE's and changes needed to make Satellite support work (maybe a few more XMLRPC methods?), but I don't see any major roadmap changes. From Summit conversations so far there seems to be a lot of interest in image management and the power stuff (we may spawn a seperate FedoraHosted project for the power bits), so that's definitely on my shortlist. And that means Satellite/Spacewalk can then acquire those features too. --Michael From mdehaan at redhat.com Sat Jun 21 02:37:50 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Fri, 20 Jun 2008 22:37:50 -0400 Subject: [et-mgmt-tools] Cobbler BIND DNS management confusion In-Reply-To: <1213912731.3894.51.camel@dblaptop> References: <1213903073.3894.39.camel@dblaptop> <1213904592.3894.45.camel@dblaptop> <1B4E5897-472A-4F77-BC18-5EC4D9222BF1@redhat.com> <1213912731.3894.51.camel@dblaptop> Message-ID: <485C697E.9070005@redhat.com> Dustin Black wrote: > On Thu, 2008-06-19 at 17:16 -0400, Chris MacLeod wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> >> On Jun 19, 2008, at 3:43 PM, Dustin Black wrote: >> >> >>> Interesting. I see that there is some convention to the line return >>> and >>> the preceding dash that is both odd and poorly documented. I had: >>> >> It's YAML. YAML's datastructures are pretty well defined (at least in >> the terms of yaml they are). >> >> foo: blah # is a string variable called 'foo' with the value of 'blah' >> foo: >> - blah # is an array called 'foo' with an index[0] whose value is >> 'blah' >> >> > > That makes sense, now. I haven't seen anything before now stating that > the settings file is YAML. Maybe it should be commented at the top of > the file and noted in the Wiki? > > Totally fair, comments have been added to the config file. Thanks! --Michael From mdehaan at redhat.com Sat Jun 21 02:39:00 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Fri, 20 Jun 2008 22:39:00 -0400 Subject: [et-mgmt-tools] [PATCH] cobbler buildiso add --systems option and fix --profiles selection. In-Reply-To: <4859147F.9050000@davehatton.it> References: <4859147F.9050000@davehatton.it> Message-ID: <485C69C4.4080408@redhat.com> Dave Hatton wrote: > The attached patch is for the "cobbler buildiso" command > 1. It fixes the --profile option so that you can now *really* specify > which profiles you wish to include in the kickstart.iso > 2. It adds a --systems option to allow you add specific systems to the > kickstart.iso > > What is the process for having this reviewed and if suitable, merged > into cobbler? > > Regards > > Daveh This looks great to me, I'll test and apply early next week. Thanks! --Michael > ------------------------------------------------------------------------ > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From mdehaan at redhat.com Sat Jun 21 02:44:55 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Fri, 20 Jun 2008 22:44:55 -0400 Subject: [et-mgmt-tools] Help debugging Cobbler's syslog support In-Reply-To: <20080618132253.GJ22392@tumbolia-jboss-dev.usersys.redhat.com> References: <20080618132253.GJ22392@tumbolia-jboss-dev.usersys.redhat.com> Message-ID: <485C6B27.2010707@redhat.com> Brenton Leanhardt wrote: > Yesterday I hit some problem with a new kickstart. While trying to > debug the issue I realized Cobbler's syslog support was no longer > working for me. Unfortunately I don't know when it stopped working, > only that it was indeed working for me a few weeks ago. Basically > nothing shows up under /var/log/cobbler/{kicklog,syslog}. > My setup: > > Version: Cobbler 1.1.0 (built from git) > Fedora 8 using rsyslog > Kernel: 2.6.21-2950.fc8xen #1 SMP Tue Oct 23 12:24:34 EDT 2007 i686 > i686 i386 > GNU/Linux > No firewall > Cobbler syslog port: 25150 (It's indeed listening on all interfaces) > > I also couldn't figure out what virsh command would show me the > kernel_options for my running guest. That would help me verify it's > using the correct hostname/port. If anyone has any idea of where else > I could look to debug this I would greatly appreciate it. > > --Brenton > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From cobbler system dumpvars --name=foo 'kernel_options': {'ksdevice': 'eth0', 'kssendmac': None, 'lang': ' ', 'syslog': '127.0.0.1:25150', 'text': None}, It's possible that something is broken in cobbler and could have been for some time, judging from when I've last seen this on my box. You should see the syslog bit in kernel options. If you want to debug around the code, it's "do_syslog" in cobblerd.py. Pulling out wireshark might be helpful, though may not be neccessary. File a bug on this in Trac if you haven't already... this does look broken to me. Should be easy enough to find/fix. --Michael From mdehaan at redhat.com Sat Jun 21 02:50:51 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Fri, 20 Jun 2008 22:50:51 -0400 Subject: [et-mgmt-tools] Re: Just upgraded cobbler to 1.0.2 from epel [ issues ] In-Reply-To: <656618.90156.qm@web46301.mail.sp1.yahoo.com> References: <656618.90156.qm@web46301.mail.sp1.yahoo.com> Message-ID: <485C6C8B.2020102@redhat.com> Donnie M. wrote: > > Donnie M. wrote: > > > > when I go to the url of one of my profiles > (http://server1/cblr/svc/op/ks/profile/RHEL4.6-32bit-i386 for > example) I get the following in my web browser: > > ====== START ====== > > Mod_python error: "PythonHandler services" > > Traceback (most recent call last): > > > > File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", > line 299, in HandlerDispatch > > result = object(req) > > > I had a similar error earlier today. Restarting apache fixed it. > > > Unfortunately that did not solve the issue, all of those python errors are still there. > I stopped, then started apache, then I did the same for cobblerd daemon as well. No change. > > What bugs me out is that at the end of the traceback, the fault space is empty. I have no idea > how one would debug this but I am more than happy to help the developers get to the bottom of this. > This is a stock 5.1 machine with minor updates. > > > > > > Mod_python error: "PythonHandler services" > > Traceback (most recent call last): > > File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch > result = object(req) > > File "/var/www/cobbler/svc/services.py", line 82, in handler > content = func( **form ) > > File "/usr/lib/python2.4/site-packages/cobbler/services.py", line 70, in ks > data = self.remote.generate_kickstart(profile,system,REMOTE_ADDR,REMOTE_MAC) > > File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__ > return self.__send(self.__name, args) > > File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request > verbose=self.__verbose > > File "/usr/lib64/python2.4/xmlrpclib.py", line 1147, in request > return self._parse_response(h.getfile(), sock) > > File "/usr/lib64/python2.4/xmlrpclib.py", line 1286, in _parse_response > return u.close() > > File "/usr/lib64/python2.4/xmlrpclib.py", line 744, in close > raise Fault(**self._stack[0]) > > Fault: > > > > ------------------------------------------------------------------------ > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools Check /var/log/cobbler/cobbler.log and file a bug in Trac if it doesn't mention Cheetah -- if it does, there's a template error somewhere. Either way, email me the data from there as I'd like to see it. --Michael From swissslinky at gmail.com Sat Jun 21 14:15:53 2008 From: swissslinky at gmail.com (Slinky) Date: Sat, 21 Jun 2008 16:15:53 +0200 Subject: [et-mgmt-tools] Care to comment on the future of "Spacewalk" and cobbler? In-Reply-To: <485C6881.2070103@redhat.com> References: <485C6881.2070103@redhat.com> Message-ID: AHAHAHA!!! "There's some more stuff we can do for other distributions. There's that OS from Redmond, right ? it's an unfortunate reality that it exists, but we can help people deploy it, up until the point they wipe it completely off the face of the Earth." 2008/6/21 Michael DeHaan : > Marc Mondragon wrote: > >> >> Just saw the announcement and was wondering what was in store for cobbler >> ? >> >> Marc Mondragon >> >> Fox River Financial Resources >> >> 2100 Enterprise Avenue >> Geneva, IL 60134 >> marcmo at foxriver.com >> >> > Sure :) > > Hotel internet has been slow, so apologies on being invisible over the last > few days on the lists/IRC. > > Random note: You can see the Register picked up the Cobbler talk here... > http://www.theregister.co.uk/2008/06/19/red_hat_summit_2008_cobbler/ > > They are correct in saying that what we're doing with Cobbler, the libvirt > tools, Func, and so forth were a major factor in making the decision to open > source Satellite. This community *works*. Getting Satellite out there is > clearly something we all wanted to do for a long time, and now that it's > done, we're /really/ happy to see the excitement growing around it. We've > shown we can build a sizable community around developers and admins who want > to share and participate in developing common infrastructure. We've shown > that the open development models started in Fedora are extremely applicable > in the enterprise space (see also EPEL). With Spacewalk, this can grow > further. Spacewalk is essentially going to be an aggregrator of all sorts of > great OSS management projects in Fedora/EPEL -- we want it to become an > interface to make all of these more usable together. Step 1 is Cobbler, Step > 2 might be config management, it might be something else ... we're still > exploring. > > I was sitting around at FudCON today with lots of folks, many Satellite > users, some not, discussing the future of the project. There's a ton of > interest here and it's going to be a good thing. There's already folks > interested in diving in there and helping with database support, for > instance. People on IRC are already looking at the code and talking about > sending in patches. Very good stuff. > > Cobbler inclusion in Satellite/Spacewalk is definitely in the roadmap, and > as I mentioned in my talk (slides up now -- > https://fedorahosted.org/cobbler/wiki/PresentationStorage ) we're shooting > for early 2009 for having that there. If you want support for Cobbler you'll > be able to get that (AFAIK) through purchasing Satellite. In addition, the > Satellite GUI's provisioning options, since they will be all Cobbler > powered, will work to control cobbler -- so you'll have additional GUI > options. Cobbler command line programs will still work as normal in this > case too, as will koan. Also if you're an existing Satellite user we want > the upgrade process to be transparent. I suspect we won't surface every > Cobbler knob and fader in the Spacewalk GUI, though you'll still be able to > manipulate cobbler directly in those cases. As myself and the Sat folks have > to do some more planning, this is somewhat subject to change. I'll start a > thread up on spacewalk-devel shortly. If you're interested, definitely join > the mailing lists mentioned at fedorahosted.org/spacewalk and #spacewalk > on freenode. Development/planning is going to happen in the open there just > like it does here, so if there's something you'd like to see in Spacewalk, > please weigh in! > > So, what about stand alone Cobbler? Cobbler as a project will be continuing > on as usual and continuing it's quest for dominance :) You won't need to > install Spacewalk to use it, as there are other applications (ovirt, > possibly test tools, etc) that will want to have a provisioning service > component -- Cobbler is going to be that component. Does it go away? No. > Does it become harder to use? No. More dependencies? Also no :) It's all > good! > > I suspect there will be a few Cobbler RFE's and changes needed to make > Satellite support work (maybe a few more XMLRPC methods?), but I don't see > any major roadmap changes. > > From Summit conversations so far there seems to be a lot of interest in > image management and the power stuff (we may spawn a seperate FedoraHosted > project for the power bits), so that's definitely on my shortlist. And that > means Satellite/Spacewalk can then acquire those features too. > > --Michael > > > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lfarkas at lfarkas.org Mon Jun 23 10:22:04 2008 From: lfarkas at lfarkas.org (Farkas Levente) Date: Mon, 23 Jun 2008 12:22:04 +0200 Subject: [et-mgmt-tools] kvm pxe boot again Message-ID: <485F794C.3070206@lfarkas.org> hi, i try again pxe boot for a guest on out kvm server. the setup: - host: - Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz - Intel S3000AHV - 8GB RAM - CentOS-5.1 - kernel-2.6.18-53.1.21.el5 x86_64 64bit installed: ----------------------------------------- gtk-vnc-0.3.6-1.x86_64.rpm gtk-vnc-python-0.3.6-1.x86_64.rpm kmod-kvm-70-1.2.6.18_53.1.21.el5.x86_64.rpm kvm-70-1.x86_64.rpm libvirt-0.4.3-1.x86_64.rpm libvirt-devel-0.4.3-1.x86_64.rpm libvirt-python-0.4.3-1.x86_64.rpm python-virtinst-0.300.3-6.noarch.rpm qemu-0.9.1-8.x86_64.rpm qemu-img-0.9.1-8.x86_64.rpm virt-manager-0.5.4-4.x86_64.rpm virt-viewer-0.0.3-1.x86_64.rpm ----------------------------------------- when i try to create a new guest and run it from virt-manager this command is running: ----------------------------------------- root 16423 98.2 0.1 908016 14368 ? Sl 12:02 1:18 \_ /usr/bin/qemu-kvm -S -M pc -m 512 -smp 1 -name test -monitor pty -no-reboot -boot n -drive file=/var/lib/libvirt/images/test.img,if=ide,index=0 -net nic,macaddr=00:16:3e:2c:c2:0a,vlan=0 -net tap,fd=36,script=,vlan=0,ifname=vnet6 -serial pty -parallel none -usb -vnc 127.0.0.1:6 -k en-us ----------------------------------------- the default ethernet adapter is e1000 and etherboot try to boot, but can't find the dhcp server. the host has a bridged network and there is how can i debug it? on which interface should the guest request the dhcp? i run tcpdump on eth0, peth0, vnet6 but none of them has any kind if icmp trafic. is it a kvm, qemu or virt-manager bug? how can i found out the reason? thanks. the host's interfaces are: # ifconfig eth0 Link encap:Ethernet HWaddr 00:15:17:39:44:96 inet addr:192.168.2.4 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: fe80::215:17ff:fe39:4496/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:18763993 errors:0 dropped:0 overruns:0 frame:0 TX packets:10956228 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:4288812473 (3.9 GiB) TX bytes:13723213998 (12.7 GiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:3791403 errors:0 dropped:0 overruns:0 frame:0 TX packets:3791403 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:13289699425 (12.3 GiB) TX bytes:13289699425 (12.3 GiB) peth0 Link encap:Ethernet HWaddr 00:15:17:39:44:96 inet6 addr: fe80::215:17ff:fe39:4496/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:148903818 errors:0 dropped:0 overruns:0 frame:0 TX packets:107216505 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:154336190334 (143.7 GiB) TX bytes:72674435307 (67.6 GiB) Base address:0x2000 Memory:e8180000-e81a0000 vnet0 Link encap:Ethernet HWaddr 9A:1E:C7:8C:9C:51 inet6 addr: fe80::981e:c7ff:fe8c:9c51/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1757654 errors:0 dropped:0 overruns:0 frame:0 TX packets:3726207 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:500 RX bytes:463262809 (441.8 MiB) TX bytes:3864267943 (3.5 GiB) vnet1 Link encap:Ethernet HWaddr 9A:4D:7B:48:EC:5C inet6 addr: fe80::984d:7bff:fe48:ec5c/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:106067 errors:0 dropped:0 overruns:0 frame:0 TX packets:1091412 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:500 RX bytes:74296938 (70.8 MiB) TX bytes:243921620 (232.6 MiB) vnet2 Link encap:Ethernet HWaddr 26:C0:3C:12:4F:98 inet6 addr: fe80::24c0:3cff:fe12:4f98/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:1 carrier:0 collisions:0 txqueuelen:500 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) vnet3 Link encap:Ethernet HWaddr 52:26:C9:40:F0:56 inet6 addr: fe80::5026:c9ff:fe40:f056/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2385 errors:0 dropped:0 overruns:0 frame:0 TX packets:960588 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:500 RX bytes:175121 (171.0 KiB) TX bytes:90396414 (86.2 MiB) vnet4 Link encap:Ethernet HWaddr 02:C7:51:D9:06:42 inet6 addr: fe80::c7:51ff:fed9:642/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:1 carrier:0 collisions:0 txqueuelen:500 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) vnet5 Link encap:Ethernet HWaddr 56:2A:58:FC:5A:0F inet6 addr: fe80::542a:58ff:fefc:5a0f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:1 carrier:0 collisions:0 txqueuelen:500 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) vnet6 Link encap:Ethernet HWaddr D6:E7:0F:42:6D:D8 inet6 addr: fe80::d4e7:fff:fe42:6dd8/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:1 carrier:0 collisions:0 txqueuelen:500 RX bytes:3540 (3.4 KiB) TX bytes:0 (0.0 b) -- Levente "Si vis pacem para bellum!" From mdehaan at redhat.com Mon Jun 23 13:02:06 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Mon, 23 Jun 2008 09:02:06 -0400 Subject: [et-mgmt-tools] kvm pxe boot again In-Reply-To: <485F794C.3070206@lfarkas.org> References: <485F794C.3070206@lfarkas.org> Message-ID: <485F9ECE.9090002@redhat.com> Farkas Levente wrote: > hi, > i try again pxe boot for a guest on out kvm server. the setup: A random aside... If this is for an OS that would be reasonable to integrate with Cobbler (something Unixy) we could add it there and have more deployment solutions for when PXE isn't possible -- for instance when someone has no control over DHCP. If it's for Linux, you can already do that so you wouldn't need PXE in that case (if you were willing to use Cobbler). Of course if this is about Windows we can't do that now just yet, but it's on my todo-list to see how to better make all of that work. That's what the image management support is all about (probable integration with udpcast & the virt-image tools, etc) --Michael From lfarkas at lfarkas.org Mon Jun 23 13:32:18 2008 From: lfarkas at lfarkas.org (Farkas Levente) Date: Mon, 23 Jun 2008 15:32:18 +0200 Subject: [et-mgmt-tools] kvm pxe boot again In-Reply-To: <485F9ECE.9090002@redhat.com> References: <485F794C.3070206@lfarkas.org> <485F9ECE.9090002@redhat.com> Message-ID: <485FA5E2.7080406@lfarkas.org> Michael DeHaan wrote: > Farkas Levente wrote: >> hi, >> i try again pxe boot for a guest on out kvm server. the setup: > > A random aside... > > If this is for an OS that would be reasonable to integrate with Cobbler > (something Unixy) we could add it there and have more deployment > solutions for when PXE isn't possible -- for instance when someone has > no control over DHCP. If it's for Linux, you can already do that so you > wouldn't need PXE in that case (if you were willing to use Cobbler). > > Of course if this is about Windows we can't do that now just yet, but > it's on my todo-list to see how to better make all of that work. That's > what the image management support is all about (probable integration > with udpcast & the virt-image tools, etc) imho it's nothing to do with any kind of os or cobbler. as i wrote it's in virt-manager's at the booting stage so the problem in kvm, qemu or virt-manager. -- Levente "Si vis pacem para bellum!" From mdehaan at redhat.com Mon Jun 23 14:47:14 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Mon, 23 Jun 2008 10:47:14 -0400 Subject: [et-mgmt-tools] kvm pxe boot again In-Reply-To: <485FA5E2.7080406@lfarkas.org> References: <485F794C.3070206@lfarkas.org> <485F9ECE.9090002@redhat.com> <485FA5E2.7080406@lfarkas.org> Message-ID: <485FB772.2090308@redhat.com> Farkas Levente wrote: > Michael DeHaan wrote: >> Farkas Levente wrote: >>> hi, >>> i try again pxe boot for a guest on out kvm server. the setup: >> >> A random aside... >> >> If this is for an OS that would be reasonable to integrate with >> Cobbler (something Unixy) we could add it there and have more >> deployment solutions for when PXE isn't possible -- for instance when >> someone has no control over DHCP. If it's for Linux, you can already >> do that so you wouldn't need PXE in that case (if you were willing to >> use Cobbler). >> >> Of course if this is about Windows we can't do that now just yet, but >> it's on my todo-list to see how to better make all of that work. >> That's what the image management support is all about (probable >> integration with udpcast & the virt-image tools, etc) > > imho it's nothing to do with any kind of os or cobbler. as i wrote > it's in virt-manager's at the booting stage so the problem in kvm, > qemu or virt-manager. > Yes, this was me just farming for patches on a semi-related topic -- namely getting more Unixy support in there. From jboyer at liquidnet.com Tue Jun 24 13:25:24 2008 From: jboyer at liquidnet.com (Joseph Boyer Jr.) Date: Tue, 24 Jun 2008 09:25:24 -0400 Subject: [et-mgmt-tools] [PATCH] cobbler buildiso add --systems option and fix --profiles selection. In-Reply-To: <485C69C4.4080408@redhat.com> References: <4859147F.9050000@davehatton.it> <485C69C4.4080408@redhat.com> Message-ID: <26AA63832ED7774DBFB9FFB39B337C002477988B@nj0cech03.lnholdings.com> Hello there... I have made some updates to the updates that Dave H had made to the action_buildiso.py. Here is the list of my updates: (P.S. I am new to python so if my coding sucks, please bear with me) 1. reordered the build iso menu so that systems are first. 2. Did not understand why we rely on DHCP when you have a "System". So I have added the networking information to the kernel line for systems, thus eliminating the need for DHCP. (This is what I needed in the boot iso). 3. Update the copy initrd and kernel so that only the initrd and kernel for the systems listed are copied. (did not see any need to have a huge boot iso, if you have many distros, and wanted to keep it as small as possible.) 4. The boot menu will only list systems if --system is given on the cmdline. By default bootiso will build the boot menu for all profiles list in cobbler. Cheers, joe Joseph Boyer Jr Enterprise Technology Services Liquidnet Holdings, Inc. Joseph.Boyer at liquidnet.com T +1 646.660.8352 C +1 646.284.8394 -----Original Message----- From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Michael DeHaan Sent: Friday, June 20, 2008 10:39 PM To: Fedora/Linux Management Tools Subject: Re: [et-mgmt-tools] [PATCH] cobbler buildiso add --systems option and fix --profiles selection. Dave Hatton wrote: > The attached patch is for the "cobbler buildiso" command > 1. It fixes the --profile option so that you can now *really* specify > which profiles you wish to include in the kickstart.iso > 2. It adds a --systems option to allow you add specific systems to the > kickstart.iso > > What is the process for having this reviewed and if suitable, merged > into cobbler? > > Regards > > Daveh This looks great to me, I'll test and apply early next week. Thanks! --Michael > ------------------------------------------------------------------------ > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools at redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools -------------- next part -------------- A non-text attachment was scrubbed... Name: action_buildiso.py Type: application/octet-stream Size: 8781 bytes Desc: action_buildiso.py URL: From berrange at redhat.com Tue Jun 24 15:04:27 2008 From: berrange at redhat.com (Daniel P. Berrange) Date: Tue, 24 Jun 2008 16:04:27 +0100 Subject: [et-mgmt-tools] [PATCH] Enable to send F10 key to the guest OS. In-Reply-To: <48363446.8020601@aa.jp.fujitsu.com> References: <48363123.605@aa.jp.fujitsu.com> <48363446.8020601@aa.jp.fujitsu.com> Message-ID: <20080624150427.GD2156@redhat.com> On Fri, May 23, 2008 at 12:04:38PM +0900, Hiroyuki Kaguchi wrote: > On 2008/05/23 11:51, Hiroyuki Kaguchi wrote: > > The F10 key is assigned as the accelerator of the menu bar in the OS(Windows or > > Linux). > > On this account it is necessary to send the F10 key to the guest OS. > > However, with the existing specifications of virt-viewer, the F10 key is > > assigned to the accelerator > > of the menu bar of virt-viewer and we cannot send the F10 key to the guest OS. > > So, I change virt-viewer to be able to send F10 key to the guest OS when > > virt-viewer grabs the keyboard. The idea of the patch is a good one, but I think it is possible for the user to customize the accelerator for menus. So by clearing the accelerator and then resetting it to "F10" we would be overriding the user's customization. So before clearing the accelerator we should first make a record of what the current setting is. This will let us correctly restore it later. > diff -r 5299a3aaebb5 src/main.c > --- a/src/main.c Sun Apr 27 23:41:26 2008 -0400 > +++ b/src/main.c Wed May 21 17:35:09 2008 +0900 > @@ -116,6 +116,8 @@ static void viewer_grab(GtkWidget *vnc, > for (i = 0 ; i < LAST_MENU; i++) { > gtk_label_set_text_with_mnemonic(GTK_LABEL(menuItems[i].label), menuItems[i].grabbed_text); > } > + > + gtk_settings_set_string_property(gtk_settings_get_default(), "gtk-menu-bar-accel", "", ""); > } > > static void viewer_ungrab(GtkWidget *vnc, GtkWidget *window) > @@ -127,6 +129,8 @@ static void viewer_ungrab(GtkWidget *vnc > for (i = 0 ; i < LAST_MENU; i++) { > gtk_label_set_text_with_mnemonic(GTK_LABEL(menuItems[i].label), menuItems[i].ungrabbed_text); > } > + > + gtk_settings_set_string_property(gtk_settings_get_default(), "gtk-menu-bar-accel", "F10", ""); > } > > static void viewer_shutdown(GtkWidget *src G_GNUC_UNUSED, void *dummy G_GNUC_UNUSED, GtkWidget *vnc) Regards, Daniel. -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From jboyer at liquidnet.com Tue Jun 24 15:40:36 2008 From: jboyer at liquidnet.com (Joseph Boyer Jr.) Date: Tue, 24 Jun 2008 11:40:36 -0400 Subject: [et-mgmt-tools] [PATCH] cobbler buildiso add --systems option and fix --profiles selection. In-Reply-To: <26AA63832ED7774DBFB9FFB39B337C002477988B@nj0cech03.lnholdings.com> References: <4859147F.9050000@davehatton.it> <485C69C4.4080408@redhat.com> <26AA63832ED7774DBFB9FFB39B337C002477988B@nj0cech03.lnholdings.com> Message-ID: <26AA63832ED7774DBFB9FFB39B337C0024779A95@nj0cech03.lnholdings.com> I had a typo in network stanza (had a dash before, ip, subnet and gateway) not needed. Here is the fix buildiso.py --joe Joseph Boyer Jr Enterprise Technology Services Liquidnet Holdings, Inc. Joseph.Boyer at liquidnet.com T +1 646.660.8352 C +1 646.284.8394 -----Original Message----- From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Joseph Boyer Jr. Sent: Tuesday, June 24, 2008 9:25 AM To: Fedora/Linux Management Tools Subject: RE: [et-mgmt-tools] [PATCH] cobbler buildiso add --systems option and fix --profiles selection. Hello there... I have made some updates to the updates that Dave H had made to the action_buildiso.py. Here is the list of my updates: (P.S. I am new to python so if my coding sucks, please bear with me) 1. reordered the build iso menu so that systems are first. 2. Did not understand why we rely on DHCP when you have a "System". So I have added the networking information to the kernel line for systems, thus eliminating the need for DHCP. (This is what I needed in the boot iso). 3. Update the copy initrd and kernel so that only the initrd and kernel for the systems listed are copied. (did not see any need to have a huge boot iso, if you have many distros, and wanted to keep it as small as possible.) 4. The boot menu will only list systems if --system is given on the cmdline. By default bootiso will build the boot menu for all profiles list in cobbler. Cheers, joe Joseph Boyer Jr Enterprise Technology Services Liquidnet Holdings, Inc. Joseph.Boyer at liquidnet.com T +1 646.660.8352 C +1 646.284.8394 -----Original Message----- From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Michael DeHaan Sent: Friday, June 20, 2008 10:39 PM To: Fedora/Linux Management Tools Subject: Re: [et-mgmt-tools] [PATCH] cobbler buildiso add --systems option and fix --profiles selection. Dave Hatton wrote: > The attached patch is for the "cobbler buildiso" command 1. It fixes > the --profile option so that you can now *really* specify which > profiles you wish to include in the kickstart.iso 2. It adds a > --systems option to allow you add specific systems to the > kickstart.iso > > What is the process for having this reviewed and if suitable, merged > into cobbler? > > Regards > > Daveh This looks great to me, I'll test and apply early next week. Thanks! --Michael > ---------------------------------------------------------------------- > -- > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools at redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools -------------- next part -------------- A non-text attachment was scrubbed... Name: action_buildiso.py Type: application/octet-stream Size: 8778 bytes Desc: action_buildiso.py URL: From mdehaan at redhat.com Tue Jun 24 16:27:55 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Tue, 24 Jun 2008 12:27:55 -0400 Subject: [et-mgmt-tools] [PATCH] cobbler buildiso add --systems option and fix --profiles selection. In-Reply-To: <4859147F.9050000@davehatton.it> References: <4859147F.9050000@davehatton.it> Message-ID: <4861208B.7030608@redhat.com> Dave Hatton wrote: > The attached patch is for the "cobbler buildiso" command > 1. It fixes the --profile option so that you can now *really* specify > which profiles you wish to include in the kickstart.iso > 2. It adds a --systems option to allow you add specific systems to the > kickstart.iso > > What is the process for having this reviewed and if suitable, merged > into cobbler? > > Regards > > Daveh > ------------------------------------------------------------------------ > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools Applied, thanks! --Michael From mdehaan at redhat.com Tue Jun 24 16:31:08 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Tue, 24 Jun 2008 12:31:08 -0400 Subject: [et-mgmt-tools] [PATCH] cobbler buildiso add --systems option and fix --profiles selection. In-Reply-To: <26AA63832ED7774DBFB9FFB39B337C002477988B@nj0cech03.lnholdings.com> References: <4859147F.9050000@davehatton.it> <485C69C4.4080408@redhat.com> <26AA63832ED7774DBFB9FFB39B337C002477988B@nj0cech03.lnholdings.com> Message-ID: <4861214C.5090609@redhat.com> Joseph Boyer Jr. wrote: > Hello there... > > I have made some updates to the updates that Dave H had made to the action_buildiso.py. > > Here is the list of my updates: (P.S. I am new to python so if my coding sucks, please bear with me) > > 1. reordered the build iso menu so that systems are first. > How about second with a seperator between the profiles and the systems, or otherwise a 2-level menu that lets you pick first "profiles" or "systems"? > 2. Did not understand why we rely on DHCP when you have a "System". So I have added the networking information to the kernel line for systems, thus eliminating the need for DHCP. (This is what I needed in the boot iso). > This sounds good. > 3. Update the copy initrd and kernel so that only the initrd and kernel for the systems listed are copied. (did not see any need to have a huge boot iso, if you have many distros, and wanted to keep it as small as possible.) > Also sounds good. > 4. The boot menu will only list systems if --system is given on the cmdline. By default bootiso will build the boot menu for all profiles list in cobbler. > Also also good. If you can resubmit this as a patch I'll review and apply it. git-format-patch and git-send-email work really well for this. --Michael From lists at davehatton.it Tue Jun 24 17:38:25 2008 From: lists at davehatton.it (Dave Hatton) Date: Tue, 24 Jun 2008 18:38:25 +0100 Subject: [et-mgmt-tools] [PATCH] cobbler buildiso add --systems option and fix --profiles selection. In-Reply-To: <4861214C.5090609@redhat.com> References: <4859147F.9050000@davehatton.it> <485C69C4.4080408@redhat.com> <26AA63832ED7774DBFB9FFB39B337C002477988B@nj0cech03.lnholdings.com> <4861214C.5090609@redhat.com> Message-ID: <48613111.7060807@davehatton.it> Joseph, Michael I'm the first to admit my python skills aren't great, so I'm pleased to see an improvements. >> I have made some updates to the updates that Dave H had made to the >> action_buildiso.py. >> >> Here is the list of my updates: (P.S. I am new to python so if my >> coding sucks, please bear with me) >> >> 1. reordered the build iso menu so that systems are first. >> > How about second with a seperator between the profiles and the > systems, or otherwise a 2-level menu that lets you pick first > "profiles" or "systems"? I really like seing the profiles on the CD as well as the system. This allows me to carry out some diagnostics against the profiles if I screw up the systems entries. I'd be please to see what the code looked like to have a two level menu - if only as a selfish learning exercise. >> 2. Did not understand why we rely on DHCP when you have a "System". >> So I have added the networking information to the kernel line for >> systems, thus eliminating the need for DHCP. (This is what I needed >> in the boot iso). >> > This sounds good. I think this is my poor understanding of how this works. I didn't want to rely on dhcp either - I just couldn't workout how to append an IP address. This answers for me a problem I saw today. Should the broadcast address be added as well? For completeness? Dave From lists at davehatton.it Tue Jun 24 17:43:59 2008 From: lists at davehatton.it (Dave Hatton) Date: Tue, 24 Jun 2008 18:43:59 +0100 Subject: [et-mgmt-tools] [PATCH] cobbler buildiso add --systems option and fix --profiles selection. In-Reply-To: <48613111.7060807@davehatton.it> References: <4859147F.9050000@davehatton.it> <485C69C4.4080408@redhat.com> <26AA63832ED7774DBFB9FFB39B337C002477988B@nj0cech03.lnholdings.com> <4861214C.5090609@redhat.com> <48613111.7060807@davehatton.it> Message-ID: <4861325F.2050009@davehatton.it> Sorry, one more thing, to improve my python. Why do you import item_distro/profile/system? I didn't see them being used elsewhere, what am I missing? Dave From mdehaan at redhat.com Tue Jun 24 17:52:24 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Tue, 24 Jun 2008 13:52:24 -0400 Subject: [et-mgmt-tools] [PATCH] cobbler buildiso add --systems option and fix --profiles selection. In-Reply-To: <48613111.7060807@davehatton.it> References: <4859147F.9050000@davehatton.it> <485C69C4.4080408@redhat.com> <26AA63832ED7774DBFB9FFB39B337C002477988B@nj0cech03.lnholdings.com> <4861214C.5090609@redhat.com> <48613111.7060807@davehatton.it> Message-ID: <48613458.7020209@redhat.com> Dave Hatton wrote: > Joseph, Michael > > I'm the first to admit my python skills aren't great, so I'm pleased > to see an improvements. >>> I have made some updates to the updates that Dave H had made to the >>> action_buildiso.py. >>> >>> Here is the list of my updates: (P.S. I am new to python so if my >>> coding sucks, please bear with me) >>> >>> 1. reordered the build iso menu so that systems are first. >>> >> How about second with a seperator between the profiles and the >> systems, or otherwise a 2-level menu that lets you pick first >> "profiles" or "systems"? > I really like seing the profiles on the CD as well as the system. This > allows me to carry out some diagnostics against the profiles if I > screw up the systems entries. > I'd be please to see what the code looked like to have a two level > menu - if only as a selfish learning exercise. Yeah, that can get a little bit complicated with syslinux, ideally if we don't do that I'd like to see the profiles, a seperator, and then the systems. > > >>> 2. Did not understand why we rely on DHCP when you have a "System". >>> So I have added the networking information to the kernel line for >>> systems, thus eliminating the need for DHCP. (This is what I needed >>> in the boot iso). >>> >> This sounds good. > I think this is my poor understanding of how this works. I didn't want > to rely on dhcp either - I just couldn't workout how to append an IP > address. This answers for me a problem I saw today. Right. If the system has the ip and other network info defined, we can add the kernel arguments for that on the end of the append line if that does not take the length of the append line to more than 255. > Should the broadcast address be added as well? For completeness? Not required AFAIK. > > > Dave > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From jboyer at liquidnet.com Tue Jun 24 19:45:13 2008 From: jboyer at liquidnet.com (Joseph Boyer Jr.) Date: Tue, 24 Jun 2008 15:45:13 -0400 Subject: [et-mgmt-tools] [PATCH] cobbler buildiso add --systems option and fix --profiles selection. In-Reply-To: <4861325F.2050009@davehatton.it> References: <4859147F.9050000@davehatton.it> <485C69C4.4080408@redhat.com> <26AA63832ED7774DBFB9FFB39B337C002477988B@nj0cech03.lnholdings.com> <4861214C.5090609@redhat.com> <48613111.7060807@davehatton.it> <4861325F.2050009@davehatton.it> Message-ID: <26AA63832ED7774DBFB9FFB39B337C0024779DBD@nj0cech03.lnholdings.com> I was attempting to do something else and left them in needlessly. They can be removed. --joe Joseph Boyer Jr Enterprise Technology Services Liquidnet Holdings, Inc. Joseph.Boyer at liquidnet.com T +1 646.660.8352 C +1 646.284.8394 -----Original Message----- From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Dave Hatton Sent: Tuesday, June 24, 2008 1:44 PM To: Fedora/Linux Management Tools Subject: Re: [et-mgmt-tools] [PATCH] cobbler buildiso add --systems option and fix --profiles selection. Sorry, one more thing, to improve my python. Why do you import item_distro/profile/system? I didn't see them being used elsewhere, what am I missing? Dave _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools at redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools From darren.hennessy at advitech.com.au Wed Jun 25 04:05:28 2008 From: darren.hennessy at advitech.com.au (darren.hennessy at advitech.com.au) Date: Wed, 25 Jun 2008 14:05:28 +1000 Subject: [et-mgmt-tools] Endless "following symlink" Message-ID: Hi, I have recently installed cobbler from rpm on a new Fedora 9 system. I have attempted to do an rsync import from an older Fedora Core 5 box with a view to making a virtualised copy of the machine. I used the following import command: cobbler import --mirror=rsync://root at 192.168.1.17/server --arch=i386 --name=Mac --rsync-flags="--exclude=/proc --exclude=/sys --exclude=/tmp/*" where the rsync "server" module's path simply points to '/' The cobbler check command reports a clean configuration The cobbler setting are defaults with server, next_server and some 'virt' parameters changed. The rsync copy appeared to go ok but following the copy an enless stream of "following symlink" messages are displayd on the console (and gradually getting longer in length). The machine was left overnight but the messages were still scrolling away in the morning. I noticed Drew Einhorn mentioned something similar in a post on April 10 2008 but I believe this was put down to a non-redhat based distro. This is not the case here. Has anyone else seen this behavior or have any idea what might cause it? thanks, Darren ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Advitech Pty Limited ABN 29 003 433 458 1 Elizabeth Street, Tighes Hill NSW, Newcastle, Australia PO Box 207, Mayfield 2304 NSW, Australia Phone +61 2 49616544 Fax +61 2 49693530 http://www.advitech.com.au ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NOTICE - This message contains information intended only for the use of the addressee named above. It may also be confidential and/or privileged. If you are not the intended recipient of this message you are hereby notified that you must not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify Advitech Pty Limited immediately via mailto:mail at advitech.com.au. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -------------- next part -------------- An HTML attachment was scrubbed... URL: From tomackell at duke-energy.com Wed Jun 25 11:45:34 2008 From: tomackell at duke-energy.com (Mackell, Thomas O) Date: Wed, 25 Jun 2008 07:45:34 -0400 Subject: [et-mgmt-tools] Is Update this Easy In-Reply-To: <20080624154107.21D378E0197@hormel.redhat.com> References: <20080624154107.21D378E0197@hormel.redhat.com> Message-ID: <1B3160038A79B54DB674532195C68A587F94F0@IMCLTEXCP15.nam.ent.duke-energy.com> This is kind of a stupid question, however I figured I better ask before I do something dumb... Since I installed my current system using clobber, now I want to upgrade it. Currently running Fedora 8, and now I just imported the distribution on my cobbler server. So I think I need to make a new kickstart with just a few lines in it, like update instead of install, no package selection, or disk setup. Just a basic one like this: ########### # Kickstart to update server update lang en_US.UTF-8 keyboard us timezone --utc America/New_York lang en ######## Then I define the server in cobbler and point to the distribution in there. Make a new iso using the buildiso routine. Is this going to be as simple as I think ? Thank You, Thomas Mackell From terry.allen.gotzon at census.gov Wed Jun 25 14:12:16 2008 From: terry.allen.gotzon at census.gov (terry.allen.gotzon at census.gov) Date: Wed, 25 Jun 2008 10:12:16 -0400 Subject: [et-mgmt-tools] Terry Gotzon is out of the office. Message-ID: I will be out of the office starting Tue 06/24/2008 and will not return until Mon 06/30/2008. I will respond to your email when I return. In the mean time, please contact Jason Leidner or James McDermott for any technical issues concerning blade servers. From haerry+et at puzzle.ch Wed Jun 25 14:23:44 2008 From: haerry+et at puzzle.ch (Marcel Haerry) Date: Wed, 25 Jun 2008 16:23:44 +0200 Subject: [et-mgmt-tools] [PATCH 1/1] added rhpl require for rpm Message-ID: <1214403824-30120-1-git-send-email-haerry+et@puzzle.ch> From: Marcel Haerry If rhpl isn't installed the following error occure: Stopping cobbler daemon: [FAILED] Starting cobbler daemon: Traceback (most recent call last): File "/usr/bin/cobblerd", line 20, in ? import cobbler.cobblerd as app File "/usr/lib/python2.4/site-packages/cobbler/cobblerd.py", line 28, in ? import remote File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 21, in ? from rhpl.translate import _, N_, textdomain, utf8 ImportError: No module named rhpl.translate [FAILED] Signed-off-by: Marcel Haerry --- cobbler.spec | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/cobbler.spec b/cobbler.spec index 71c9de3..88849b1 100644 --- a/cobbler.spec +++ b/cobbler.spec @@ -15,6 +15,7 @@ Requires: createrepo Requires: mod_python Requires: python-cheetah Requires: rsync +Requires: rhpl Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service -- 1.5.5.1 From lists at davehatton.it Wed Jun 25 14:18:11 2008 From: lists at davehatton.it (Dave Hatton) Date: Wed, 25 Jun 2008 15:18:11 +0100 Subject: [et-mgmt-tools] Re: [PATCH] cobbler buildiso add --systems option and fix --profiles selection. In-Reply-To: <4859147F.9050000@davehatton.it> References: <4859147F.9050000@davehatton.it> Message-ID: <486253A3.2010007@davehatton.it> Here is an updated patch for action_buildiso.py I have run the diff against the original version of the program - would it be better against the version in git? Changes: 1. Captured Joesphs changes to clean up images placed in iso - but I've left it to always include profiles and distros 2. I've changed "localboot 0/-1" option to use "KERNEL chain.32" with an "APPEND" 3. Modified to make sure chain.c32 is added to the image 4. Added code to remove the buildiso directory if it exists to make sure old files aren't kept around 5. Added a check and warning if APPEND line exceeds 250chars (think that could be 254?) 6. Incorporated Joesphs IP address fixes 7. Added a MENU SEPARATOR when adding systems I have a new chain.c32 and a replacement isolinux.bin file to go in /var/lib/cobbler - should I send them to the ML? Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: action_buildiso.py.patch URL: From jboyer at liquidnet.com Wed Jun 25 14:51:34 2008 From: jboyer at liquidnet.com (Joseph Boyer Jr.) Date: Wed, 25 Jun 2008 10:51:34 -0400 Subject: [et-mgmt-tools] Re: [PATCH] cobbler buildiso add --systems option and fix --profiles selection. In-Reply-To: <486253A3.2010007@davehatton.it> References: <4859147F.9050000@davehatton.it> <486253A3.2010007@davehatton.it> Message-ID: <26AA63832ED7774DBFB9FFB39B337C002477A35A@nj0cech03.lnholdings.com> Very nice work! Thanks!! Cheers, joe Joseph Boyer Jr Enterprise Technology Services Liquidnet Holdings, Inc. Joseph.Boyer at liquidnet.com T +1 646.660.8352 C +1 646.284.8394 -----Original Message----- From: et-mgmt-tools-bounces at redhat.com [mailto:et-mgmt-tools-bounces at redhat.com] On Behalf Of Dave Hatton Sent: Wednesday, June 25, 2008 10:18 AM To: et-mgmt-tools at redhat.com Subject: [et-mgmt-tools] Re: [PATCH] cobbler buildiso add --systems option and fix --profiles selection. Here is an updated patch for action_buildiso.py I have run the diff against the original version of the program - would it be better against the version in git? Changes: 1. Captured Joesphs changes to clean up images placed in iso - but I've left it to always include profiles and distros 2. I've changed "localboot 0/-1" option to use "KERNEL chain.32" with an "APPEND" 3. Modified to make sure chain.c32 is added to the image 4. Added code to remove the buildiso directory if it exists to make sure old files aren't kept around 5. Added a check and warning if APPEND line exceeds 250chars (think that could be 254?) 6. Incorporated Joesphs IP address fixes 7. Added a MENU SEPARATOR when adding systems I have a new chain.c32 and a replacement isolinux.bin file to go in /var/lib/cobbler - should I send them to the ML? Dave From shenson at redhat.com Wed Jun 25 15:03:53 2008 From: shenson at redhat.com (Scott Henson) Date: Wed, 25 Jun 2008 11:03:53 -0400 Subject: [et-mgmt-tools] Endless "following symlink" In-Reply-To: References: Message-ID: <48625E59.8040602@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 darren.hennessy at advitech.com.au wrote: | Hi, | I have recently installed cobbler from rpm on a new Fedora 9 system. I | have attempted to do an rsync import from an older Fedora Core 5 box with | a view to making a virtualised copy of the machine. I used the following | import command: | | cobbler import --mirror=rsync://root at 192.168.1.17/server --arch=i386 | --name=Mac --rsync-flags="--exclude=/proc --exclude=/sys --exclude=/tmp/*" | I think you may be using cobbler wrong. Import is used to import distributions into cobbler not systems. For instance, you can import Fedora 8 but not a machine installed with Fedora 8. - -- Scott Henson Red Hat Production Operations Release Engineer WVU Alum BSAE/BSME -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkhiXlgACgkQcQOfHbe3DKDO9wCeOoc056+7uCPfNZi5lxEpza1I jYIAn3dO7RfkWUe99EfxDpx9bGUBuUpB =QDsT -----END PGP SIGNATURE----- From mdehaan at redhat.com Wed Jun 25 15:42:34 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Wed, 25 Jun 2008 11:42:34 -0400 Subject: [et-mgmt-tools] Endless "following symlink" In-Reply-To: <48625E59.8040602@redhat.com> References: <48625E59.8040602@redhat.com> Message-ID: <4862676A.4040404@redhat.com> Scott Henson wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > darren.hennessy at advitech.com.au wrote: > | Hi, > | I have recently installed cobbler from rpm on a new Fedora 9 system. I > | have attempted to do an rsync import from an older Fedora Core 5 box > with > | a view to making a virtualised copy of the machine. I used the > following > | import command: > | > | cobbler import --mirror=rsync://root at 192.168.1.17/server --arch=i386 > | --name=Mac --rsync-flags="--exclude=/proc --exclude=/sys > --exclude=/tmp/*" > | > > I think you may be using cobbler wrong. Import is used to import > distributions into cobbler not systems. For instance, you can import > Fedora 8 but not a machine installed with Fedora 8. Indeed. Import operates on DVD ISO's or rsync mirrors of distributions, such as the kind you typically find on kernel.org. Read the manpage and the Wiki for more documentation and examples of what this is intended to do. Additionally, it only supports RHEL, CentOS, and Fedora imports. For other Linux support, use "cobbler distro add", not import, patches are always welcome to add import for other distros. > > - -- > Scott Henson > Red Hat Production Operations Release Engineer > WVU Alum BSAE/BSME > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.9 (GNU/Linux) > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org > > iEYEARECAAYFAkhiXlgACgkQcQOfHbe3DKDO9wCeOoc056+7uCPfNZi5lxEpza1I > jYIAn3dO7RfkWUe99EfxDpx9bGUBuUpB > =QDsT > -----END PGP SIGNATURE----- > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From mdehaan at redhat.com Wed Jun 25 15:46:23 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Wed, 25 Jun 2008 11:46:23 -0400 Subject: [et-mgmt-tools] Is Update this Easy In-Reply-To: <1B3160038A79B54DB674532195C68A587F94F0@IMCLTEXCP15.nam.ent.duke-energy.com> References: <20080624154107.21D378E0197@hormel.redhat.com> <1B3160038A79B54DB674532195C68A587F94F0@IMCLTEXCP15.nam.ent.duke-energy.com> Message-ID: <4862684F.2000402@redhat.com> Mackell, Thomas O wrote: > This is kind of a stupid question, however I figured I better ask > before I do something dumb... > > Since I installed my current system using clobber, now I want to upgrade > it. > Currently running Fedora 8, and now I just imported the distribution on > my cobbler server. > > So I think I need to make a new kickstart with just a few lines in it, > like update instead of install, no package selection, or disk setup. > Just a basic one like this: > ########### > # Kickstart to update server > > update > lang en_US.UTF-8 > keyboard us > timezone --utc America/New_York > lang en > ######## > Then I define the server in cobbler and point to the distribution in > there. > Make a new iso using the buildiso routine. > Pretty much that's how it works. You'll want to make sure your upgrade kickstart is correct for all the options you want, which may mean going through the update process on a similar system and copying what gets installed in /root/anaconda.ks (the results of all the questions you answer are saved for future kickstarting), tweak it if needed, and use that for subsequent systems to get it fully automated. You should be able to cobbler import F9 and just assign your systems to a F9 based update profile if you wanted to do that via netbooting as well. Generally I don't do a lot of upgrade kickstarts (in fact, F9 on my own laptop seemed much happier doing a clean install), so YMMV. --Michael > Is this going to be as simple as I think ? > > Thank You, > Thomas Mackell > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > From mdehaan at redhat.com Wed Jun 25 15:50:41 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Wed, 25 Jun 2008 11:50:41 -0400 Subject: [et-mgmt-tools] [PATCH 1/1] added rhpl require for rpm In-Reply-To: <1214403824-30120-1-git-send-email-haerry+et@puzzle.ch> References: <1214403824-30120-1-git-send-email-haerry+et@puzzle.ch> Message-ID: <48626951.7050100@redhat.com> Marcel Haerry wrote: > From: Marcel Haerry > > If rhpl isn't installed the following error occure: > > Stopping cobbler daemon: [FAILED] > Starting cobbler daemon: Traceback (most recent call last): > File "/usr/bin/cobblerd", line 20, in ? > import cobbler.cobblerd as app > File "/usr/lib/python2.4/site-packages/cobbler/cobblerd.py", line 28, in ? > import remote > File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 21, in ? > from rhpl.translate import _, N_, textdomain, utf8 > ImportError: No module named rhpl.translate > [FAILED] > > Signed-off-by: Marcel Haerry > --- > cobbler.spec | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/cobbler.spec b/cobbler.spec > index 71c9de3..88849b1 100644 > --- a/cobbler.spec > +++ b/cobbler.spec > @@ -15,6 +15,7 @@ Requires: createrepo > Requires: mod_python > Requires: python-cheetah > Requires: rsync > +Requires: rhpl > Requires(post): /sbin/chkconfig > Requires(preun): /sbin/chkconfig > Requires(preun): /sbin/service > You fixed it, in a different way :) I've removed rhpl entirely in devel, so the fix here is actually to remove rhpl for the master branch also as we aren't using it (when I get around to adding translation, we're much more likely to go through Transifex, and rhpl is not otherwise used). I think most people should have it installed, but thanks for the heads up. If there's a 1.0.3 release (there should be) before 1.1 gets promoted to 1.2, the fix will be included. Thanks for the heads up! --Michael From hhoffman at ip-solutions.net Wed Jun 25 16:00:18 2008 From: hhoffman at ip-solutions.net (Harry Hoffman) Date: Wed, 25 Jun 2008 12:00:18 -0400 Subject: [et-mgmt-tools] Cobbler/Koan restrictions with AS/CentOS Message-ID: <1214409618.23104.13.camel@n1-14-96.dhcp.drexel.edu> Hi All, We've got cobbler/koan setup to dole out installations of both RHAS5.x and CentOS5.x (and soon possibly Fedora to students). The way it stands now we include legitimate keys in our kickstart files and associated the kickstarts with a profile (i.e. RHAS-5.1-x86_64-webserver). This works fine and everyone who deserves to get a entitlement gets one. Upon reboot (and connection to a publicly routed network) they update their systems automagically. We want to branch out and allow others to use the install server but obviously we don't want them to install AS and get a valid entitlement when they haven't purchased one. Since we can't mask out certain profiles/kickstarts from the install server I'm looking for advice and how to do this in a "non-hackish" manner. I'd prefer to only have the one cobbler server but the more I think about it the less likely that seems to be. I'm guessing we'd need one "free" cobbler server and one "you paid for it" cobbler server. Any thoughts? Cheers, Harry From mdehaan at redhat.com Wed Jun 25 16:18:42 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Wed, 25 Jun 2008 12:18:42 -0400 Subject: [et-mgmt-tools] Cobbler/Koan restrictions with AS/CentOS In-Reply-To: <1214409618.23104.13.camel@n1-14-96.dhcp.drexel.edu> References: <1214409618.23104.13.camel@n1-14-96.dhcp.drexel.edu> Message-ID: <48626FE2.1020608@redhat.com> Harry Hoffman wrote: > Hi All, > > We've got cobbler/koan setup to dole out installations of both RHAS5.x > and CentOS5.x (and soon possibly Fedora to students). > > The way it stands now we include legitimate keys in our kickstart files > and associated the kickstarts with a profile (i.e. > RHAS-5.1-x86_64-webserver). > > This works fine and everyone who deserves to get a entitlement gets one. > > Upon reboot (and connection to a publicly routed network) they update > their systems automagically. > > We want to branch out and allow others to use the install server but > obviously we don't want them to install AS and get a valid entitlement > when they haven't purchased one. > > Since we can't mask out certain profiles/kickstarts from the install > server I'm looking for advice and how to do this in a "non-hackish" > manner. > > I'd prefer to only have the one cobbler server but the more I think > about it the less likely that seems to be. I'm guessing we'd need one > "free" cobbler server and one "you paid for it" cobbler server. > I suggested Harry ask this here as there are a lot of academic install bases that may have similar questions (wanting to provide installs for certain labs/machines different from other labs/machines/dorms? Now that I think about it, offering free PXE to Fedora on every network might be amusing -- especially if you also do Windows tech support). I think the best possible answer is to play some fun network games to make each set of servers get the "right" cobbler server. As ultimately if you have a machine on your network that can get at the install tree, it can still run rhn_regks against RHN and Satellite to consume your entitlement that you didn't want it to consume. You could also probably just play some other (simpler?) network games to make sure it can't contact RHN and keep using the same server, but that doesn't solve the problem of them picking the wrong install option. It is possible to configure PXE menus and such to require passwords for certain options, though that doesn't cover --replace-self. I think I like the 2 server approach best. Anyone else have ideas? --Michael > Any thoughts? > > Cheers, > Harry > > > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > From haerry+et at puzzle.ch Wed Jun 25 18:00:46 2008 From: haerry+et at puzzle.ch (Marcel Haerry) Date: Wed, 25 Jun 2008 20:00:46 +0200 Subject: [et-mgmt-tools] [PATCH 1/1] Enhance mange_dns to optionally not (re)start bind Message-ID: <1214416846-14671-1-git-send-email-haerry+et@puzzle.ch> From: Marcel Haerry Use case: We'd like to manage our bind zone files by cobbler, however on the cobbler server itself, no dhcp server should be running as they are copied on a specific dns server. With the following changes, you can set a settings variable manage_dns_mode to remote, and cobbler won't anymore (re)start bind nor check its status. The default setting is local, which is the current behaviour. If nothing is set, the current behaviour is respected. So it only changes something if you set manage_dns_mode to remote. Signed-off-by: Marcel Haerry --- cobbler/action_check.py | 3 ++- config/settings | 6 ++++++ triggers/restart-services.trigger | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cobbler/action_check.py b/cobbler/action_check.py index 3f7c8fc..03cde91 100644 --- a/cobbler/action_check.py +++ b/cobbler/action_check.py @@ -49,7 +49,8 @@ class BootCheck: if self.settings.manage_dns: mode = self.config.api.get_sync().dns.what() - if mode == "bind": + mode_dns = self.settings.manage_dns_mode + if (mode == "bind") and (mode_dns != "remote"): self.check_bind_bin(status) self.check_service(status,"named") elif mode == "dnsmasq" and not self.settings.manage_dhcp: diff --git a/config/settings b/config/settings index 221241a..fe5c633 100644 --- a/config/settings +++ b/config/settings @@ -84,6 +84,12 @@ manage_dhcp: 0 # the choice of DNS mangement engine is in /etc/cobbler/modules.conf manage_dns: 0 +# set to remote to disable named (re)starting. +# This option can be interesting if you'd like to manage dns zone files +# by cobbler but aren't running named on the cobbler server itself. +# Values: local, remote +manage_dns_mode: local + # if using BIND (named) for DNS management in /etc/cobbler/modules.conf # and manage_dns is enabled (above), this lists which zones are managed # See the Wiki (https://fedorahosted.org/cobbler/wiki/ManageDns) for more info diff --git a/triggers/restart-services.trigger b/triggers/restart-services.trigger index d586f46..7b04efc 100644 --- a/triggers/restart-services.trigger +++ b/triggers/restart-services.trigger @@ -11,6 +11,7 @@ settings = bootapi.settings() manage_dhcp = str(settings.manage_dhcp).lower() manage_dhcp_mode = str(settings.manage_dhcp_mode).lower() manage_dns = str(settings.manage_dns).lower() +manage_dns_mode = str(settings.manage_dns_mode).lower() omapi_enabled = settings.omapi_enabled omapi_port = settings.omapi_port @@ -25,7 +26,7 @@ if manage_dhcp != "0": print "- error: unknown DHCP engine: %s" % manage_dhcp_mode rc = 411 -if manage_dns != "0": +if (manage_dns != "0") and (manage_dns_mode != "remote"): rc = os.system("/sbin/service named restart") sys.exit(rc) -- 1.5.5.1 From haerry+et at puzzle.ch Wed Jun 25 18:04:16 2008 From: haerry+et at puzzle.ch (Marcel Haerry) Date: Wed, 25 Jun 2008 20:04:16 +0200 Subject: [SPAM] [et-mgmt-tools] [PATCH 1/1] Enhance mange_dns to optionally not (re)start bind In-Reply-To: <1214416846-14671-1-git-send-email-haerry+et@puzzle.ch> References: <1214416846-14671-1-git-send-email-haerry+et@puzzle.ch> Message-ID: <486288A0.2070907@puzzle.ch> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > Use case: We'd like to manage our bind zone files by cobbler, > however on the cobbler server itself, no dhcp server should be "no dns server" for sure :P greets Marcel -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkhiiJ8ACgkQxqnHThA4pEnXQACePZf38XJM1evqWEU07iFQnFDM 2yEAn3J0KH8Y9uTOx50fRhFOYyNev9xk =/c6w -----END PGP SIGNATURE----- From mdehaan at redhat.com Wed Jun 25 18:14:09 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Wed, 25 Jun 2008 14:14:09 -0400 Subject: [et-mgmt-tools] [PATCH 1/1] Enhance mange_dns to optionally not (re)start bind In-Reply-To: <1214416846-14671-1-git-send-email-haerry+et@puzzle.ch> References: <1214416846-14671-1-git-send-email-haerry+et@puzzle.ch> Message-ID: <48628AF1.80100@redhat.com> Marcel Haerry wrote: > From: Marcel Haerry > > Use case: We'd like to manage our bind zone files by cobbler, > however on the cobbler server itself, no dhcp server should be > running as they are copied on a specific dns server. > > With the following changes, you can set a settings variable > manage_dns_mode to remote, and cobbler won't anymore (re)start > bind nor check its status. > The default setting is local, which is the current behaviour. If > nothing is set, the current behaviour is respected. So it only > changes something if you set manage_dns_mode to remote. > > Thanks very much for the patch. It turns out that the way this patch is implemented exposes something I need to fix in cobbler -- namely, manage_dhcp_mode and manage_dns_mode are no longer used. Instead, these modes are governed by modules.conf. So what we need to do is make this trigger access the modules system and call the restart functions in those modules systems, and add two new settings to the config file to govern whether or not DNS and DHCP (respectively) are managed locally, and we add those to the trigger. Apologies for the confusion, these two settings in the code are dead and I need to pull them out. I'll do that now so I can apply what your patch does as well as make something workable for 1.0.3. --Michael > Signed-off-by: Marcel Haerry > --- > cobbler/action_check.py | 3 ++- > config/settings | 6 ++++++ > triggers/restart-services.trigger | 3 ++- > 3 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/cobbler/action_check.py b/cobbler/action_check.py > index 3f7c8fc..03cde91 100644 > --- a/cobbler/action_check.py > +++ b/cobbler/action_check.py > @@ -49,7 +49,8 @@ class BootCheck: > > if self.settings.manage_dns: > mode = self.config.api.get_sync().dns.what() > - if mode == "bind": > + mode_dns = self.settings.manage_dns_mode > + if (mode == "bind") and (mode_dns != "remote"): > self.check_bind_bin(status) > self.check_service(status,"named") > elif mode == "dnsmasq" and not self.settings.manage_dhcp: > diff --git a/config/settings b/config/settings > index 221241a..fe5c633 100644 > --- a/config/settings > +++ b/config/settings > @@ -84,6 +84,12 @@ manage_dhcp: 0 > # the choice of DNS mangement engine is in /etc/cobbler/modules.conf > manage_dns: 0 > > +# set to remote to disable named (re)starting. > +# This option can be interesting if you'd like to manage dns zone files > +# by cobbler but aren't running named on the cobbler server itself. > +# Values: local, remote > +manage_dns_mode: local > + > # if using BIND (named) for DNS management in /etc/cobbler/modules.conf > # and manage_dns is enabled (above), this lists which zones are managed > # See the Wiki (https://fedorahosted.org/cobbler/wiki/ManageDns) for more info > diff --git a/triggers/restart-services.trigger b/triggers/restart-services.trigger > index d586f46..7b04efc 100644 > --- a/triggers/restart-services.trigger > +++ b/triggers/restart-services.trigger > @@ -11,6 +11,7 @@ settings = bootapi.settings() > manage_dhcp = str(settings.manage_dhcp).lower() > manage_dhcp_mode = str(settings.manage_dhcp_mode).lower() > manage_dns = str(settings.manage_dns).lower() > +manage_dns_mode = str(settings.manage_dns_mode).lower() > omapi_enabled = settings.omapi_enabled > omapi_port = settings.omapi_port > > @@ -25,7 +26,7 @@ if manage_dhcp != "0": > print "- error: unknown DHCP engine: %s" % manage_dhcp_mode > rc = 411 > > -if manage_dns != "0": > +if (manage_dns != "0") and (manage_dns_mode != "remote"): > rc = os.system("/sbin/service named restart") > > sys.exit(rc) > From haerry+et at puzzle.ch Wed Jun 25 18:21:52 2008 From: haerry+et at puzzle.ch (Marcel Haerry) Date: Wed, 25 Jun 2008 20:21:52 +0200 Subject: [SPAM] Re: [et-mgmt-tools] [PATCH 1/1] Enhance mange_dns to optionally not (re)start bind In-Reply-To: <48628AF1.80100@redhat.com> References: <1214416846-14671-1-git-send-email-haerry+et@puzzle.ch> <48628AF1.80100@redhat.com> Message-ID: <48628CC0.20603@puzzle.ch> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi > Thanks very much for the patch. It turns out that the way this patch > is implemented exposes something I need to fix in cobbler -- namely, > manage_dhcp_mode and manage_dns_mode are no longer used. Instead, > these modes are governed by modules.conf. > > So what we need to do is make this trigger access the modules system and > call the restart functions in those modules systems, and add two new > settings to the config file to govern whether or not DNS and DHCP > (respectively) are managed locally, and we add those to the trigger. > > Apologies for the confusion, these two settings in the code are dead and > I need to pull them out. I'll do that now so I can apply what your > patch does as well as make something workable for 1.0.3. ah ok, I nearly thought that while looking at the modules.conf, however this was _after_ I implemented this patch, so I thought it might be worth a try to submit it. So thanks for your implementation or if you aren't doing it right now, it would be nice to have some advices how that should be. Is the isc mode already implented the modules way? Because from the manage_dhcp_mode I was cheating for my implementation. greets Marcel -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkhijL8ACgkQxqnHThA4pEk6SACg0xVlLfw9mxJWw/jZG2MUmZN3 euUAn0zWcSLDGyIiHcXIJCI0zIKMtUmq =4lpS -----END PGP SIGNATURE----- From mdehaan at redhat.com Wed Jun 25 18:28:21 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Wed, 25 Jun 2008 14:28:21 -0400 Subject: [SPAM] Re: [et-mgmt-tools] [PATCH 1/1] Enhance mange_dns to optionally not (re)start bind In-Reply-To: <48628CC0.20603@puzzle.ch> References: <1214416846-14671-1-git-send-email-haerry+et@puzzle.ch> <48628AF1.80100@redhat.com> <48628CC0.20603@puzzle.ch> Message-ID: <48628E45.1020308@redhat.com> Marcel Haerry wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi > > >> Thanks very much for the patch. It turns out that the way this patch >> is implemented exposes something I need to fix in cobbler -- namely, >> manage_dhcp_mode and manage_dns_mode are no longer used. Instead, >> these modes are governed by modules.conf. >> >> So what we need to do is make this trigger access the modules system and >> call the restart functions in those modules systems, and add two new >> settings to the config file to govern whether or not DNS and DHCP >> (respectively) are managed locally, and we add those to the trigger. >> >> Apologies for the confusion, these two settings in the code are dead and >> I need to pull them out. I'll do that now so I can apply what your >> patch does as well as make something workable for 1.0.3. >> > > > ah ok, I nearly thought that while looking at the modules.conf, however > this was _after_ I implemented this patch, so I thought it might be > worth a try to submit it. > So thanks for your implementation or if you aren't doing it right now, > it would be nice to have some advices how that should be. Is the isc > mode already implented the modules way? Because from the > manage_dhcp_mode I was cheating for my implementation. > Your implementation would have worked just fine other than the manage_dhcp mode in settings being pulled out. I should have my patch shortly and I'll post it to the list -- ordinarily I'd just let you do it, but this is a bit confusing and I need to straighten it up. ISC and DNS both go through modules.conf now. They are enabled in 'settings', but how they are implemented is switched by the module loader. I'm adding 'restart_dhcp' and 'restart_dns' presently and removing anything ending in "_mode". I'm also fixing up the trigger. > greets Marcel > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org > > iEYEARECAAYFAkhijL8ACgkQxqnHThA4pEk6SACg0xVlLfw9mxJWw/jZG2MUmZN3 > euUAn0zWcSLDGyIiHcXIJCI0zIKMtUmq > =4lpS > -----END PGP SIGNATURE----- > From mdehaan at redhat.com Wed Jun 25 19:01:08 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Wed, 25 Jun 2008 15:01:08 -0400 Subject: [SPAM] Re: [et-mgmt-tools] [PATCH 1/1] Enhance mange_dns to optionally not (re)start bind In-Reply-To: <48628E45.1020308@redhat.com> References: <1214416846-14671-1-git-send-email-haerry+et@puzzle.ch> <48628AF1.80100@redhat.com> <48628CC0.20603@puzzle.ch> <48628E45.1020308@redhat.com> Message-ID: <486295F4.9090705@redhat.com> Michael DeHaan wrote: > Marcel Haerry wrote: http://git.fedorahosted.org/git/cobbler?p=cobbler;a=commitdiff;h=1e7b1b8ba5a982ca801a4d8246934a2315dd5931 Here's my version of this to remove the references to the "_mode" code that should have been pulled out earlier. I don't believe they were hurting anything, and this will be in 1.0.3 when it comes out. I'll also merge this with devel. If you would like to (on your end) manage these on external boxes, one thing you might want to do is add your own version of the restart-services trigger that would know where to copy the files and could run the restart commands remotely via ssh (or even Func). I think that was the original intent of Tim's patch when we moved the trigger code outside of Sync into something that was more user editable. If you have any improvements to offer on this, please send them along! Thanks! --Michael From darren.hennessy at advitech.com.au Wed Jun 25 23:23:26 2008 From: darren.hennessy at advitech.com.au (darren.hennessy at advitech.com.au) Date: Thu, 26 Jun 2008 09:23:26 +1000 Subject: [et-mgmt-tools] Endless "following symlink" In-Reply-To: <4862676A.4040404@redhat.com> Message-ID: Thanks Scott and Michael, I was unclear as to whether it was possible. I did not read any doco that explicitly said import could not be used for that purpose. Thats ok though, there is always more than one way to get the job done. Thanks for the prompt reply, Darren Michael DeHaan Sent by: et-mgmt-tools-bounces at redhat.com 26/06/2008 01:42 AM Please respond to Fedora/Linux Management Tools To Fedora/Linux Management Tools cc Subject Re: [et-mgmt-tools] Endless "following symlink" Scott Henson wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > darren.hennessy at advitech.com.au wrote: > | Hi, > | I have recently installed cobbler from rpm on a new Fedora 9 system. I > | have attempted to do an rsync import from an older Fedora Core 5 box > with > | a view to making a virtualised copy of the machine. I used the > following > | import command: > | > | cobbler import --mirror=rsync://root at 192.168.1.17/server --arch=i386 > | --name=Mac --rsync-flags="--exclude=/proc --exclude=/sys > --exclude=/tmp/*" > | > > I think you may be using cobbler wrong. Import is used to import > distributions into cobbler not systems. For instance, you can import > Fedora 8 but not a machine installed with Fedora 8. Indeed. Import operates on DVD ISO's or rsync mirrors of distributions, such as the kind you typically find on kernel.org. Read the manpage and the Wiki for more documentation and examples of what this is intended to do. Additionally, it only supports RHEL, CentOS, and Fedora imports. For other Linux support, use "cobbler distro add", not import, patches are always welcome to add import for other distros. > > - -- > Scott Henson > Red Hat Production Operations Release Engineer > WVU Alum BSAE/BSME > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.9 (GNU/Linux) > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org > > iEYEARECAAYFAkhiXlgACgkQcQOfHbe3DKDO9wCeOoc056+7uCPfNZi5lxEpza1I > jYIAn3dO7RfkWUe99EfxDpx9bGUBuUpB > =QDsT > -----END PGP SIGNATURE----- > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools at redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Advitech Pty Limited ABN 29 003 433 458 1 Elizabeth Street, Tighes Hill NSW, Newcastle, Australia PO Box 207, Mayfield 2304 NSW, Australia Phone +61 2 49616544 Fax +61 2 49693530 http://www.advitech.com.au ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NOTICE - This message contains information intended only for the use of the addressee named above. It may also be confidential and/or privileged. If you are not the intended recipient of this message you are hereby notified that you must not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify Advitech Pty Limited immediately via mailto:mail at advitech.com.au. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.baker at colocity.com Thu Jun 26 08:48:40 2008 From: matt.baker at colocity.com (Matt Baker) Date: Thu, 26 Jun 2008 18:18:40 +0930 Subject: [et-mgmt-tools] build over eth1 Message-ID: After successfully building a couple of machines using cobbler, I was after some suggestions on the best way to go about rolling it out on a larger scale. Our machines all have two ethernet interfaces setup as follows: eth0 - public interface, will be configured with a static IP eth1 - build network, will be configured using DHCP managed by cobbler, with PXE booting across this network. After a bit of playing around, I have managed to get PXE booting from eth1 okay, and the first steps of the process occur okay. The OS though (CentOS) keeps still prompting for the IP address to assign eth0 The system was added to cobbler using the following command: cobbler system add --profile=CentOS-5.1-x86_64 --interface=0 -- ip=x..x.x.1 --mac=00:x:x:x:9A:F8 --gateway=x.x.x.254 --interface=1 -- name=00:x:x:x:9A:F9 where the IP x.x.x.1 is on the public interface (ethernet addr 00:x:x:x:9A:F8) and ethernet 00:x:x:x:9A:F9 is on the build network interface Is this the "right" way to go about this, or should I instead be modifying profiles/ks files? Thanks for any suggestions, Matt From mdehaan at redhat.com Thu Jun 26 12:54:05 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Thu, 26 Jun 2008 08:54:05 -0400 Subject: [et-mgmt-tools] build over eth1 In-Reply-To: References: Message-ID: <4863916D.3050402@redhat.com> Matt Baker wrote: > After successfully building a couple of machines using cobbler, I was > after some suggestions on the best way to go about rolling it out on a > larger scale. > > Our machines all have two ethernet interfaces setup as follows: > > eth0 - public interface, will be configured with a static IP > eth1 - build network, will be configured using DHCP managed by > cobbler, with PXE booting across this network. > > After a bit of playing around, I have managed to get PXE booting from > eth1 okay, and the first steps of the process occur okay. The OS > though (CentOS) keeps still prompting for the IP address to assign eth0 Basically this deals with not having the extra network line in the kickstart file, not with what you have configured in Cobbler. > > The system was added to cobbler using the following command: > > cobbler system add --profile=CentOS-5.1-x86_64 --interface=0 > --ip=x..x.x.1 --mac=00:x:x:x:9A:F8 --gateway=x.x.x.254 --interface=1 > --name=00:x:x:x:9A:F9 > This is fine, in fact, interface=0 is the default, so you don't need to specify it. You can have any number of interfaces listed here (well, up to 8 currently), and you do not need to enter all of them into Cobbler, just the ones that you need to show up in the PXE Linux tree and possibly for DHCP reservations. I assume the "x's" are just to not share the full details here and aren't literal. > > where the IP x.x.x.1 is on the public interface (ethernet addr > 00:x:x:x:9A:F8) > and ethernet 00:x:x:x:9A:F9 is on the build network interface > > > Is this the "right" way to go about this, or should I instead be > modifying profiles/ks files? > You need to do both. If you have two network interfaces, your kickstart needs two network lines. Basically you can use variables like $ip_address_intf0 and so forth in there to automate filling those in if you like, or just putting in two lines to tell both interfaces to dhcp. You might also be able to indicate the other interface should not be used there also. I'd also recommend looking into ksdevice=link for kernel options. > > Thanks for any suggestions, > > > Matt > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From mdehaan at redhat.com Thu Jun 26 14:18:59 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Thu, 26 Jun 2008 10:18:59 -0400 Subject: [et-mgmt-tools] Endless "following symlink" In-Reply-To: References: Message-ID: <4863A553.9040608@redhat.com> darren.hennessy at advitech.com.au wrote: > > Thanks Scott and Michael, > I was unclear as to whether it was possible. I did not read any doco > that explicitly said import could not be used for that purpose. > Thats ok though, there is always more than one way to get the job done. > It did explicitly say what it could be used for, however :) "Cobbler import will not make you breakfast" :) > Thanks for the prompt reply, > Darren > > > > *Michael DeHaan * > Sent by: et-mgmt-tools-bounces at redhat.com > > 26/06/2008 01:42 AM > Please respond to > Fedora/Linux Management Tools > > > > To > Fedora/Linux Management Tools > cc > > Subject > Re: [et-mgmt-tools] Endless "following symlink" > > > > > > > > > > Scott Henson wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > darren.hennessy at advitech.com.au wrote: > > | Hi, > > | I have recently installed cobbler from rpm on a new Fedora 9 system. I > > | have attempted to do an rsync import from an older Fedora Core 5 box > > with > > | a view to making a virtualised copy of the machine. I used the > > following > > | import command: > > | > > | cobbler import --mirror=rsync://root at 192.168.1.17/server --arch=i386 > > | --name=Mac --rsync-flags="--exclude=/proc --exclude=/sys > > --exclude=/tmp/*" > > | > > > > I think you may be using cobbler wrong. Import is used to import > > distributions into cobbler not systems. For instance, you can import > > Fedora 8 but not a machine installed with Fedora 8. > > Indeed. Import operates on DVD ISO's or rsync mirrors of > distributions, such as the kind you typically find on kernel.org. Read > the manpage and the Wiki for more documentation and examples of what > this is intended to do. > > Additionally, it only supports RHEL, CentOS, and Fedora imports. For > other Linux support, use "cobbler distro add", not import, patches are > always welcome to add import for other distros. > > > > > - -- > > Scott Henson > > Red Hat Production Operations Release Engineer > > WVU Alum BSAE/BSME > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v2.0.9 (GNU/Linux) > > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org > > > > iEYEARECAAYFAkhiXlgACgkQcQOfHbe3DKDO9wCeOoc056+7uCPfNZi5lxEpza1I > > jYIAn3dO7RfkWUe99EfxDpx9bGUBuUpB > > =QDsT > > -----END PGP SIGNATURE----- > > > > _______________________________________________ > > et-mgmt-tools mailing list > > et-mgmt-tools at redhat.com > > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > > > *----------------------------------------- > Advitech Pty Limited > **ABN 29 003 433 458 > 1 Elizabeth Street, Tighes Hill NSW, Newcastle, Australia > PO Box 207, Mayfield 2304 NSW, Australia > Phone +61 2 49616544 Fax +61 2 49693530 > http://www.advitech.com.au* > ----------------------------------------- > *NOTICE *- This message contains information intended only for the use > of the addressee named above. It may also be confidential and/or > privileged. If you are not the intended recipient of this message you > are hereby notified that you must not disseminate, copy or take any > action in reliance on it. If you have received this message in error > please notify Advitech Pty Limited immediately via > mail at advitech.com.au . > ----------------------------------------- > > ------------------------------------------------------------------------ > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From jboggs at redhat.com Thu Jun 26 14:26:30 2008 From: jboggs at redhat.com (Joey Boggs) Date: Thu, 26 Jun 2008 10:26:30 -0400 Subject: [et-mgmt-tools] [PATCH] convert vmware machines to virt-image xml format Message-ID: <4863A716.2050202@redhat.com> These patches provide the virt-unpack command which converts vmware format machines into virt-image xml format hvm/paravirt runnable instances. Next revision will contain libvirt format as well. As also with the virt-pack command all required vmware/xen/hvm kernel modules must be in place prior to conversion to boot machine. -------------- next part -------------- A non-text attachment was scrubbed... Name: virt-unpack.patch Type: text/x-patch Size: 8802 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: virt-unpack-pod.patch Type: text/x-patch Size: 2512 bytes Desc: not available URL: From jboggs at redhat.com Thu Jun 26 14:32:11 2008 From: jboggs at redhat.com (Joey Boggs) Date: Thu, 26 Jun 2008 10:32:11 -0400 Subject: [et-mgmt-tools] [PATCH] convert vmware machines to virt-image xml format In-Reply-To: <4863A716.2050202@redhat.com> References: <4863A716.2050202@redhat.com> Message-ID: <4863A86B.5080403@redhat.com> Forgot to merge back changes into the tree before running the latest patch, updated patch file Joey Boggs wrote: > These patches provide the virt-unpack command which converts vmware > format machines into virt-image xml format hvm/paravirt runnable > instances. Next revision will contain libvirt format as well. As also > with the virt-pack command all required vmware/xen/hvm kernel modules > must be in place prior to conversion to boot machine. > ------------------------------------------------------------------------ > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools -------------- next part -------------- A non-text attachment was scrubbed... Name: virt-unpack.patch Type: text/x-patch Size: 8143 bytes Desc: not available URL: From crobinso at redhat.com Thu Jun 26 15:10:29 2008 From: crobinso at redhat.com (Cole Robinson) Date: Thu, 26 Jun 2008 11:10:29 -0400 Subject: [et-mgmt-tools] [PATCH] convert vmware machines to virt-image xml format In-Reply-To: <4863A86B.5080403@redhat.com> References: <4863A716.2050202@redhat.com> <4863A86B.5080403@redhat.com> Message-ID: <4863B165.1080809@redhat.com> Joey Boggs wrote: >> These patches provide the virt-unpack command which converts vmware >> format machines into virt-image xml format hvm/paravirt runnable >> instances. Next revision will contain libvirt format as well. As also >> with the virt-pack command all required vmware/xen/hvm kernel modules >> must be in place prior to conversion to boot machine. >> ------------------------------------------------------------------------ >> Comments inline: > diff -Naur virtinst--devel.orig/virt-unpack virtinst--devel/virt-unpack > --- virtinst--devel.orig/virt-unpack 1969-12-31 19:00:00.000000000 -0500 > +++ virtinst--devel/virt-unpack 2008-06-26 10:30:45.000000000 -0400 > @@ -0,0 +1,231 @@ > +#!/usr/bin/python > +# > +# Convert a VMware(tm) virtual machine into an XML image description > +# > +# Copyright 2008 Red Hat, Inc. > +# Joey Boggs > +# > +# This program is free software; you can redistribute it and/or modify > +# it under the terms of the GNU General Public License as published by > +# the Free Software Foundation; either version 2 of the License, or > +# (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program; if not, write to the Free Software > +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, > +# MA 02110-1301 USA. > + > +import sys > +from string import ascii_letters > +import virtinst.cli as cli > +import os > +import random > +import pdb > +import shutil > +import logging > +from optparse import OptionParser, OptionValueError > + > +def parse_args(): > + parser = OptionParser() > + parser.set_usage("%prog [options] image.vmx") > + parser.add_option("-a", "--arch", type="string", dest="arch", > + help=("Machine Architecture Type (i686/x86_64/ppc)")) > + parser.add_option("-t", "--type", type="string", dest="type", > + help=("Output virtualization type (hvm, paravirt")) For type I would use the convention that virt-install uses: add seperate options for --paravirt and --hvm (optionally -p or -v). Also I'd recommend just defaulting to --hvm since that is the most common case at this point. > + parser.add_option("-d", "--debug", action="store_true", dest="debug", > + help=("Print debugging information")) > + parser.add_option("-o", "--outputdir", type="string", dest="outputdir", > + help=("Output directory in which files will be created")) > + (options,args) = parser.parse_args() > + > + if len(args) < 1: > + parser.error(("You need to provide an image XML descriptor")) > + options.file = args[0] > + > + if (options.arch is None) or (options.type is None): > + parser.error(("You need to provide all input options" > + "\n\nArchitecture: " + str(options.arch) + > + "\nOutput Virt Type: " + str(options.type))) > + sys.exit(1) Won't need sys.exit here since parser.error will handle this for you. > + return options > + > +# Begin creation of xml template from parsed vmx config file > +def create_xml_template(disks_list,record,options,dirname): Kind of a nit, but create_xml_template isn't really descriptive. convert_to_image? vmx_to_image? > + pv_disk_list = [] > + fv_disk_list = [] > + storage_disk_list = [] > + > + name = record["displayName"] > + memory = record["memsize"] > + memory = int(memory) * 1024 > + > + # can't guarantee annotation or vcpus are set in vmware config, requires evaluation > + if record.has_key("annotation"): > + annotation = record["annotation"] > + else: > + annotation = "" > + > + if record.has_key("numvcpus"): > + vcpus = record["numvcpus"] > + else: > + vcpus = "1" > + > +# create disk filename lists for xml template > + for (number, file) in enumerate(disks_list): > + file = str(file.replace(".vmdk","")).strip() > + pv_disk_list.append("""""" % \ > + (file, ascii_letters[number % 26])) > + fv_disk_list.append("""""" % \ > + (file, ascii_letters[number % 26])) > + storage_disk_list.append("""""" % (file)) > +# determine virtualization type for image.boot section > + if options.type == "paravirt": > + virt_boot_template = """ > + > + %(vm_arch)s > + > + > + > + > + > + pygrub > + > + %(vm_pv_disks)s > + """ > + elif options.type == "fullvirt": > + > + virt_boot_template = """ > + > + %(vm_arch)s > + > + > + > + > + %(vm_fv_disks)s > + """ > + else: > + print "Invalid virtualization type specified" > + sys.exit(1) If you use the above --paravirt/--hvm option change, you won't need this check. > + > + > +# xml replacements dictionaries > + virt_boot_xml_dict = { > + "vm_pv_disks" : "".join(pv_disk_list), > + "vm_fv_disks" : "".join(fv_disk_list), > + "vm_arch" : options.arch, > + } If you do the above --paravirt/--hvm change, you can then just pass options.arch directly to the function rather than the whole options list. > + virt_boot_template = virt_boot_template % virt_boot_xml_dict > + > + virt_image_xml_dict = { > + "virt_boot_template" : virt_boot_template, > + "vm_displayName": name.replace(" ","_"), > + "vm_annotation" : annotation, > + "vm_vcpus" : vcpus, > + "vm_mem" : memory, > + "vm_storage" : "".join(storage_disk_list), > + } > + > + virt_image_xml_template = """ > + %(vm_displayName)s > + > + > + %(vm_annotation)s > + > + > + %(virt_boot_template)s > + > + %(vm_vcpus)s > + %(vm_mem)s > + > + > + > + > + > + %(vm_storage)s > + > +""" > + > + virt_image_xml_template = virt_image_xml_template % virt_image_xml_dict > + virt_image_xml_config_file = open(dirname + "/" + name + ".virtimage.xml","w") > + virt_image_xml_config_file.writelines(virt_image_xml_template) > + virt_image_xml_config_file.close() I'd recommend moving this end piece to the main function. If keeps the conversion function doing only the conversion. If we ever wanted to reuse this code in another app which won't be writing an output file, this would be a necessary change. > + return > + > +# parse input vmware configuration > +def parse_vmware_config(options): > + if not os.access(options.file,os.R_OK): > + raise ValueError, "Could not read file: %s" % options.file > + input = open(options.file,"r") > + contents = input.readlines() > + input.close() > + record = {} > + vm_config = [] > + disks_list = [] > + > +# strip out comment and blank lines for easy splitting of values > + for line in contents: > + if not line.strip() or line.startswith("#"): > + continue > + else: > + vm_config.append(line) > + > + for line in vm_config: > + beforeEq, afterEq = line.split("=", 1) > + key = beforeEq.replace(" ","") > + value = afterEq.replace('"',"") > + record[key] = value.strip() > + logging.debug("Key: %s Value: %s" % (key,value)) > + if value.endswith("vmdk\n"): # separate disks from config > + disks_list.append(value) > + return vm_config,record,disks_list,options Shouldn't need to return vm_config or options here: options hasn't changed, vm_config isn't used anywhere else. > + > + > +def convert_disks(disks_list,name,dirname): Name isn't used here anymore. > + for disk in disks_list: > + file = disk.replace(".vmdk","").strip() > + convert_cmd="qemu-img convert %s -O raw %s/%s.img" % (disk.strip(),dirname,file) > + logging.debug("Converting %s" % disk.strip()) > + print "\nConverting %s to %s/%s.img" % (disk.strip(),dirname,file) > + os.system(convert_cmd) > + > + > + > +def main(): > + options = parse_args() > + cli.setupLogging("virt-unpack", options.debug) > + vm_config = parse_vmware_config(options) > + config, record, disks_list, options = vm_config > + name = record["displayName"].replace(" ","-") Just thinking, there are a lot of checks here directly into the record. If we are passed a vmx file that is missing one of these options, either through a bad config or some change in the format, we are going to throw an undescriptive error like "Key error: displayName". Maybe create a small wrapper function like record_lookup that you pass the record and the key to, and will throw a more clear error to the user like "key 'blah' was not parsed from the vmx config" > + dirname = options.outputdir > + if not dirname: > + dirname = name > + try: > + logging.debug ("Creating directory %s" % dirname) > + os.mkdir(dirname) > + except OSError,e: > + if e.errno == 17: > + logging.error("Could not create directory %s or directory already exists", dirname) > + sys.exit(1) You'll want to exit here regardless of the errno. I'd recommend just losing the errno check, and use something general like: logging.error("Could not create directory '%s': %s" % (dirname, str(e)) sys.exit(1) Also, if you move the file creation aspect out of the create_xml_template, you can move the dir creation after the create_xml_template call. That way we move the dir creation as late as possible so that if there is an exception earlier in the process we don't need to clean up/delete the unpopulated directory. > + > + create_xml_template(disks_list,record,options,dirname) > + convert_disks(disks_list,name,dirname) > + > + print "\n\nConversion completed and placed in: %s" % dirname > + > + > +if __name__ == "__main__": > + try: > + main() > + except SystemExit, e: > + sys.exit(e.code) > + except KeyboardInterrupt, e: > + print >> sys.stderr, _("Aborted at user request") > + except Exception, e: > + logging.exception(e) > + sys.exit(1) > + Thanks, Cole From berrange at redhat.com Thu Jun 26 15:19:01 2008 From: berrange at redhat.com (Daniel P. Berrange) Date: Thu, 26 Jun 2008 16:19:01 +0100 Subject: [et-mgmt-tools] [PATCH] convert vmware machines to virt-image xml format In-Reply-To: <4863B165.1080809@redhat.com> References: <4863A716.2050202@redhat.com> <4863A86B.5080403@redhat.com> <4863B165.1080809@redhat.com> Message-ID: <20080626151901.GR20952@redhat.com> On Thu, Jun 26, 2008 at 11:10:29AM -0400, Cole Robinson wrote: > > +def parse_args(): > > + parser = OptionParser() > > + parser.set_usage("%prog [options] image.vmx") > > + parser.add_option("-a", "--arch", type="string", dest="arch", > > + help=("Machine Architecture Type (i686/x86_64/ppc)")) > > + parser.add_option("-t", "--type", type="string", dest="type", > > + help=("Output virtualization type (hvm, paravirt")) > > For type I would use the convention that virt-install uses: add seperate > options for --paravirt and --hvm (optionally -p or -v). Also I'd recommend > just defaulting to --hvm since that is the most common case at this point. Yes, keeping consistent naming of CLI args across all the virt-XXX tools is very important - even if some of our existing naming is a little odd :-) Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From "Bryan M. Kearney " at redhat.com Thu Jun 26 16:47:27 2008 From: "Bryan M. Kearney " at redhat.com ("Bryan M. Kearney " at redhat.com) Date: Thu, 26 Jun 2008 12:47:27 -0400 Subject: [et-mgmt-tools] [PATCH] Added a --replace option to virt-image which allows it to replace an existing machine if it is current running or defined Message-ID: # HG changeset patch # User "Bryan M. Kearney " # Date 1214497967 14400 # Node ID efba908eb79ad0bf2805c27f784de92578207f1b # Parent 63aca2dbb3154a65505b1ccef080a8887742cef5 Added a --replace option to virt-image which allows it to replace an existing machine if it is current running or defined diff -r 63aca2dbb315 -r efba908eb79a virt-image --- a/virt-image Tue Jun 24 12:30:24 2008 -0400 +++ b/virt-image Thu Jun 26 12:32:47 2008 -0400 @@ -142,7 +142,10 @@ def parse_args(): help=_("The zero-based index of the boot record to use")) parser.add_option("", "--force", action="store_true", dest="force", help=_("Do not prompt for input. Answers yes where applicable, terminates for all other prompts"), - default=False) + default=False) + parser.add_option("", "--replace",action="store_true", dest="replace", + help=_("Overwrite, or destroy, an existing image with the same name"), + default=False) (options,args) = parser.parse_args() if len(args) < 1: @@ -211,7 +214,7 @@ def main(): try: print _("\n\nCreating guest %s...") % guest.name - dom = guest.start_install(None, progresscb) + dom = guest.start_install(None, progresscb, options.replace) if dom is None: print _("Guest creation failed") sys.exit(1) diff -r 63aca2dbb315 -r efba908eb79a virtinst/Guest.py --- a/virtinst/Guest.py Tue Jun 24 12:30:24 2008 -0400 +++ b/virtinst/Guest.py Thu Jun 26 12:32:47 2008 -0400 @@ -914,7 +914,7 @@ class Guest(object): "action": action } - def start_install(self, consolecb = None, meter = None): + def start_install(self, consolecb = None, meter = None, removeOld = False): """Do the startup of the guest installation.""" self.validate_parms() @@ -924,7 +924,7 @@ class Guest(object): self._prepare_install(meter) try: - return self._do_install(consolecb, meter) + return self._do_install(consolecb, meter, removeOld) finally: self._installer.cleanup() @@ -932,10 +932,20 @@ class Guest(object): self._install_disks = self.disks[:] self._install_nics = self.nics[:] - def _do_install(self, consolecb, meter): + def _do_install(self, consolecb, meter, removeOld = False): try: - if self.conn.lookupByName(self.name) is not None: - raise RuntimeError, _("Domain named %s already exists!") %(self.name,) + vm = self.conn.lookupByName(self.name) + if removeOld: + if vm is not None: + if vm.ID() == -1: + logging.info("Removing old definition for image %s" %(self.name)) + vm.undefine() + else: + logging.info("Destroying image %s" %(self.name)) + vm.destroy() + else: + if vm is not None: + raise RuntimeError, _("Domain named %s already exists!") %(self.name,) except libvirt.libvirtError: pass From dlutter at redhat.com Thu Jun 26 17:53:51 2008 From: dlutter at redhat.com (David Lutterkort) Date: Thu, 26 Jun 2008 17:53:51 +0000 Subject: [et-mgmt-tools] [PATCH] Added a --replace option to virt-image which allows it to replace an existing machine if it is current running or defined In-Reply-To: References: Message-ID: <1214502831.3896.145.camel@localhost.localdomain> On Thu, 2008-06-26 at 12:47 -0400, Bryan M. Kearney @redhat.com wrote: > # HG changeset patch > # User "Bryan M. Kearney " > # Date 1214497967 14400 > # Node ID efba908eb79ad0bf2805c27f784de92578207f1b > # Parent 63aca2dbb3154a65505b1ccef080a8887742cef5 > Added a --replace option to virt-image which allows it to replace an existing machine if it is current running or defined Couldn't the same be achieved with a small shell script wrapper around the virt-image invocation, something like virsh list | grep -q $NAME && virsh destroy $NAME virt-image $IMAGE_XML It seems that this patch addresses a very specific use case (repeatedly starting a VM based on the same image.xml) Other than that it might be redundant though, the patch looks fine. David From dlutter at redhat.com Thu Jun 26 17:58:33 2008 From: dlutter at redhat.com (David Lutterkort) Date: Thu, 26 Jun 2008 17:58:33 +0000 Subject: [et-mgmt-tools] Endless "following symlink" In-Reply-To: References: Message-ID: <1214503113.3896.147.camel@localhost.localdomain> On Wed, 2008-06-25 at 14:05 +1000, darren.hennessy at advitech.com.au wrote: > I have recently installed cobbler from rpm on a new Fedora 9 system. I > have attempted to do an rsync import from an older Fedora Core 5 box > with a view to making a virtualised copy of the machine. This is not the tool you are looking for. You actually want virt-p2v[1] ;) David [1] http://et.redhat.com/~rjones/virt-p2v/ From bkearney at redhat.com Thu Jun 26 18:07:33 2008 From: bkearney at redhat.com (Bryan Kearney) Date: Thu, 26 Jun 2008 14:07:33 -0400 Subject: [et-mgmt-tools] [PATCH] Added a --replace option to virt-image which allows it to replace an existing machine if it is current running or defined In-Reply-To: <1214502831.3896.145.camel@localhost.localdomain> References: <1214502831.3896.145.camel@localhost.localdomain> Message-ID: <4863DAE5.8070609@redhat.com> David Lutterkort wrote: > On Thu, 2008-06-26 at 12:47 -0400, Bryan M. Kearney @redhat.com wrote: >> # HG changeset patch >> # User "Bryan M. Kearney " >> # Date 1214497967 14400 >> # Node ID efba908eb79ad0bf2805c27f784de92578207f1b >> # Parent 63aca2dbb3154a65505b1ccef080a8887742cef5 >> Added a --replace option to virt-image which allows it to replace an existing machine if it is current running or defined > > Couldn't the same be achieved with a small shell script wrapper around > the virt-image invocation, something like > > virsh list | grep -q $NAME && virsh destroy $NAME > virt-image $IMAGE_XML > > It seems that this patch addresses a very specific use case (repeatedly > starting a VM based on the same image.xml) > > Other than that it might be redundant though, the patch looks fine. > For me, if I have a shutoff machine then 'virsh list' does not return anything, but virt-manager shows me the shutoff machine. In addition, virt-image will fail on an install because of the shutoff machine. I believe your script would work if the machine was running, and if I knew the name of the machine inside the image_xml. So. this patch will destroy a running one, or replace a defined one with the same name. -- bk From lw at lwilke.de Thu Jun 26 17:31:32 2008 From: lw at lwilke.de (Lars Wilke) Date: Thu, 26 Jun 2008 19:31:32 +0200 Subject: [et-mgmt-tools] Re: Teaching cobbler about images & power References: <4852859C.10405@redhat.com> Message-ID: Hi, * Michael DeHaan wrote: > The image use case: For imaging system imager is quite good. www.systemimager.org cheers --lars From berrange at redhat.com Thu Jun 26 18:39:50 2008 From: berrange at redhat.com (Daniel P. Berrange) Date: Thu, 26 Jun 2008 19:39:50 +0100 Subject: [et-mgmt-tools] [PATCH] Added a --replace option to virt-image which allows it to replace an existing machine if it is current running or defined In-Reply-To: <1214502831.3896.145.camel@localhost.localdomain> References: <1214502831.3896.145.camel@localhost.localdomain> Message-ID: <20080626183950.GA26347@redhat.com> On Thu, Jun 26, 2008 at 05:53:51PM +0000, David Lutterkort wrote: > On Thu, 2008-06-26 at 12:47 -0400, Bryan M. Kearney @redhat.com wrote: > > # HG changeset patch > > # User "Bryan M. Kearney " > > # Date 1214497967 14400 > > # Node ID efba908eb79ad0bf2805c27f784de92578207f1b > > # Parent 63aca2dbb3154a65505b1ccef080a8887742cef5 > > Added a --replace option to virt-image which allows it to replace an existing machine if it is current running or defined > > Couldn't the same be achieved with a small shell script wrapper around > the virt-image invocation, something like > > virsh list | grep -q $NAME && virsh destroy $NAME > virt-image $IMAGE_XML > > It seems that this patch addresses a very specific use case (repeatedly > starting a VM based on the same image.xml) > > Other than that it might be redundant though, the patch looks fine. I thought it was too, however, I realize now that the reason it can';t simply 'redefine' the existing VMs config is that it has the same name but different (randomly generated UUID), causing a clash and error. So it really is useful to explicitly re-define. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From berrange at redhat.com Thu Jun 26 18:42:20 2008 From: berrange at redhat.com (Daniel P. Berrange) Date: Thu, 26 Jun 2008 19:42:20 +0100 Subject: [et-mgmt-tools] [PATCH] Added a --replace option to virt-image which allows it to replace an existing machine if it is current running or defined In-Reply-To: References: Message-ID: <20080626184220.GB26347@redhat.com> On Thu, Jun 26, 2008 at 12:47:27PM -0400, "Bryan M. Kearney "@redhat.com wrote: > + if vm.ID() == -1: > + logging.info("Removing old definition for image %s" %(self.name)) > + vm.undefine() > + else: > + logging.info("Destroying image %s" %(self.name)) > + vm.destroy() You don't want this to be an either / or conditional. If the VM exists you should *always* attempt to undefine it - a running VM may or may not have a config file So you want something closer to if vm.ID() != -1: vm.destroy() try: vm.undefine() except: pass Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| From jboggs at redhat.com Thu Jun 26 20:42:16 2008 From: jboggs at redhat.com (Joey Boggs) Date: Thu, 26 Jun 2008 16:42:16 -0400 Subject: [et-mgmt-tools] [PATCH] convert vmware machines to virt-image xml format In-Reply-To: <4863B165.1080809@redhat.com> References: <4863A716.2050202@redhat.com> <4863A86B.5080403@redhat.com> <4863B165.1080809@redhat.com> Message-ID: <4863FF28.4080402@redhat.com> I integrated the common cli options and all the other modifications, but wasn't sure the best way to approach the para/full virt check removal from the comments "If you use the above --paravirt/--hvm option change, you won't need this check." Both before and after code snips below. I changed the if/else to evaluate the options for True on either para/full, if there's something else you'd want to see please let me know ------------------------------------------------------------------------------- parser.add_option("-v", "--hvm", action="store_true", dest="fullvirt", help=("This guest should be a fully virtualized guest")) parser.add_option("-p", "--paravirt", action="store_true", dest="paravirt", help=("This guest should be a paravirtualized guest")) if options.paravirt is True: virt_boot_template = """ %(vm_arch)s pygrub %(vm_pv_disks)s """ elif options.fullvirt is True: virt_boot_template = """ %(vm_arch)s %(vm_fv_disks)s """ else: print "Invalid virtualization type specified" sys.exit(1) ------------------------------------------------------------------------------- > > + if options.type == "paravirt": > > + virt_boot_template = """ > > + > > + %(vm_arch)s > > + > > + > > + > > + > > + > > + pygrub > > + > > + %(vm_pv_disks)s > > + """ > > + elif options.type == "fullvirt": > > + > > + virt_boot_template = """ > > + > > + %(vm_arch)s > > + > > + > > + > > + > > + %(vm_fv_disks)s > > + """ > > + else: > > + print "Invalid virtualization type specified" > > + sys.exit(1) If you use the above --paravirt/--hvm option change, you won't need this check. Regards, Joey Cole Robinson wrote: > Joey Boggs wrote: > > >>> These patches provide the virt-unpack command which converts vmware >>> format machines into virt-image xml format hvm/paravirt runnable >>> instances. Next revision will contain libvirt format as well. As also >>> with the virt-pack command all required vmware/xen/hvm kernel modules >>> must be in place prior to conversion to boot machine. >>> ------------------------------------------------------------------------ >>> >>> > > > Comments inline: > > >> diff -Naur virtinst--devel.orig/virt-unpack virtinst--devel/virt-unpack >> --- virtinst--devel.orig/virt-unpack 1969-12-31 19:00:00.000000000 -0500 >> +++ virtinst--devel/virt-unpack 2008-06-26 10:30:45.000000000 -0400 >> @@ -0,0 +1,231 @@ >> +#!/usr/bin/python >> +# >> +# Convert a VMware(tm) virtual machine into an XML image description >> +# >> +# Copyright 2008 Red Hat, Inc. >> +# Joey Boggs >> +# >> +# This program is free software; you can redistribute it and/or modify >> +# it under the terms of the GNU General Public License as published by >> +# the Free Software Foundation; either version 2 of the License, or >> +# (at your option) any later version. >> +# >> +# This program is distributed in the hope that it will be useful, >> +# but WITHOUT ANY WARRANTY; without even the implied warranty of >> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> +# GNU General Public License for more details. >> +# >> +# You should have received a copy of the GNU General Public License >> +# along with this program; if not, write to the Free Software >> +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, >> +# MA 02110-1301 USA. >> + >> +import sys >> +from string import ascii_letters >> +import virtinst.cli as cli >> +import os >> +import random >> +import pdb >> +import shutil >> +import logging >> +from optparse import OptionParser, OptionValueError >> + >> +def parse_args(): >> + parser = OptionParser() >> + parser.set_usage("%prog [options] image.vmx") >> + parser.add_option("-a", "--arch", type="string", dest="arch", >> + help=("Machine Architecture Type (i686/x86_64/ppc)")) >> + parser.add_option("-t", "--type", type="string", dest="type", >> + help=("Output virtualization type (hvm, paravirt")) >> > > For type I would use the convention that virt-install uses: add seperate > options for --paravirt and --hvm (optionally -p or -v). Also I'd recommend > just defaulting to --hvm since that is the most common case at this point. > > >> + parser.add_option("-d", "--debug", action="store_true", dest="debug", >> + help=("Print debugging information")) >> + parser.add_option("-o", "--outputdir", type="string", dest="outputdir", >> + help=("Output directory in which files will be created")) >> + (options,args) = parser.parse_args() >> + >> + if len(args) < 1: >> + parser.error(("You need to provide an image XML descriptor")) >> + options.file = args[0] >> + >> + if (options.arch is None) or (options.type is None): >> + parser.error(("You need to provide all input options" >> + "\n\nArchitecture: " + str(options.arch) + >> + "\nOutput Virt Type: " + str(options.type))) >> + sys.exit(1) >> > > Won't need sys.exit here since parser.error will handle this for you. > > >> + return options >> + >> +# Begin creation of xml template from parsed vmx config file >> +def create_xml_template(disks_list,record,options,dirname): >> > > Kind of a nit, but create_xml_template isn't really descriptive. > convert_to_image? vmx_to_image? > > >> + pv_disk_list = [] >> + fv_disk_list = [] >> + storage_disk_list = [] >> + >> + name = record["displayName"] >> + memory = record["memsize"] >> + memory = int(memory) * 1024 >> + >> + # can't guarantee annotation or vcpus are set in vmware config, requires evaluation >> + if record.has_key("annotation"): >> + annotation = record["annotation"] >> + else: >> + annotation = "" >> + >> + if record.has_key("numvcpus"): >> + vcpus = record["numvcpus"] >> + else: >> + vcpus = "1" >> + >> +# create disk filename lists for xml template >> + for (number, file) in enumerate(disks_list): >> + file = str(file.replace(".vmdk","")).strip() >> + pv_disk_list.append("""""" % \ >> + (file, ascii_letters[number % 26])) >> + fv_disk_list.append("""""" % \ >> + (file, ascii_letters[number % 26])) >> + storage_disk_list.append("""""" % (file)) >> +# determine virtualization type for image.boot section >> + if options.type == "paravirt": >> + virt_boot_template = """ >> + >> + %(vm_arch)s >> + >> + >> + >> + >> + >> + pygrub >> + >> + %(vm_pv_disks)s >> + """ >> + elif options.type == "fullvirt": >> + >> + virt_boot_template = """ >> + >> + %(vm_arch)s >> + >> + >> + >> + >> + %(vm_fv_disks)s >> + """ >> + else: >> + print "Invalid virtualization type specified" >> + sys.exit(1) >> > > If you use the above --paravirt/--hvm option change, you won't need > this check. > > >> + >> + >> +# xml replacements dictionaries >> + virt_boot_xml_dict = { >> + "vm_pv_disks" : "".join(pv_disk_list), >> + "vm_fv_disks" : "".join(fv_disk_list), >> + "vm_arch" : options.arch, >> + } >> > > If you do the above --paravirt/--hvm change, you can then just pass > options.arch directly to the function rather than the whole options > list. > > >> + virt_boot_template = virt_boot_template % virt_boot_xml_dict >> + >> + virt_image_xml_dict = { >> + "virt_boot_template" : virt_boot_template, >> + "vm_displayName": name.replace(" ","_"), >> + "vm_annotation" : annotation, >> + "vm_vcpus" : vcpus, >> + "vm_mem" : memory, >> + "vm_storage" : "".join(storage_disk_list), >> + } >> + >> + virt_image_xml_template = """ >> + %(vm_displayName)s >> + >> + >> + %(vm_annotation)s >> + >> + >> + %(virt_boot_template)s >> + >> + %(vm_vcpus)s >> + %(vm_mem)s >> + >> + >> + >> + >> + >> + %(vm_storage)s >> + >> +""" >> + >> + virt_image_xml_template = virt_image_xml_template % virt_image_xml_dict >> + virt_image_xml_config_file = open(dirname + "/" + name + ".virtimage.xml","w") >> + virt_image_xml_config_file.writelines(virt_image_xml_template) >> + virt_image_xml_config_file.close() >> > > I'd recommend moving this end piece to the main function. If keeps the > conversion function doing only the conversion. If we ever wanted to reuse > this code in another app which won't be writing an output file, this would > be a necessary change. > > >> + return >> + >> +# parse input vmware configuration >> +def parse_vmware_config(options): >> + if not os.access(options.file,os.R_OK): >> + raise ValueError, "Could not read file: %s" % options.file >> + input = open(options.file,"r") >> + contents = input.readlines() >> + input.close() >> + record = {} >> + vm_config = [] >> + disks_list = [] >> + >> +# strip out comment and blank lines for easy splitting of values >> + for line in contents: >> + if not line.strip() or line.startswith("#"): >> + continue >> + else: >> + vm_config.append(line) >> + >> + for line in vm_config: >> + beforeEq, afterEq = line.split("=", 1) >> + key = beforeEq.replace(" ","") >> + value = afterEq.replace('"',"") >> + record[key] = value.strip() >> + logging.debug("Key: %s Value: %s" % (key,value)) >> + if value.endswith("vmdk\n"): # separate disks from config >> + disks_list.append(value) >> + return vm_config,record,disks_list,options >> > > Shouldn't need to return vm_config or options here: options hasn't changed, > vm_config isn't used anywhere else. > > >> + >> + >> +def convert_disks(disks_list,name,dirname): >> > > Name isn't used here anymore. > > >> + for disk in disks_list: >> + file = disk.replace(".vmdk","").strip() >> + convert_cmd="qemu-img convert %s -O raw %s/%s.img" % (disk.strip(),dirname,file) >> + logging.debug("Converting %s" % disk.strip()) >> + print "\nConverting %s to %s/%s.img" % (disk.strip(),dirname,file) >> + os.system(convert_cmd) >> + >> + >> + >> +def main(): >> + options = parse_args() >> + cli.setupLogging("virt-unpack", options.debug) >> + vm_config = parse_vmware_config(options) >> + config, record, disks_list, options = vm_config >> + name = record["displayName"].replace(" ","-") >> > > Just thinking, there are a lot of checks here directly into the record. If > we are passed a vmx file that is missing one of these options, either > through a bad config or some change in the format, we are going to throw > an undescriptive error like "Key error: displayName". Maybe create a small > wrapper function like record_lookup that you pass the record and the key > to, and will throw a more clear error to the user like "key 'blah' was > not parsed from the vmx config" > > >> + dirname = options.outputdir >> + if not dirname: >> + dirname = name >> + try: >> + logging.debug ("Creating directory %s" % dirname) >> + os.mkdir(dirname) >> + except OSError,e: >> + if e.errno == 17: >> + logging.error("Could not create directory %s or directory already exists", dirname) >> + sys.exit(1) >> > > You'll want to exit here regardless of the errno. I'd recommend just losing > the errno check, and use something general like: > logging.error("Could not create directory '%s': %s" % (dirname, str(e)) > sys.exit(1) > > Also, if you move the file creation aspect out of the create_xml_template, > you can move the dir creation after the create_xml_template call. That > way we move the dir creation as late as possible so that if there is > an exception earlier in the process we don't need to clean up/delete > the unpopulated directory. > >> + >> + create_xml_template(disks_list,record,options,dirname) >> + convert_disks(disks_list,name,dirname) >> + >> + print "\n\nConversion completed and placed in: %s" % dirname >> + >> + >> +if __name__ == "__main__": >> + try: >> + main() >> + except SystemExit, e: >> + sys.exit(e.code) >> + except KeyboardInterrupt, e: >> + print >> sys.stderr, _("Aborted at user request") >> + except Exception, e: >> + logging.exception(e) >> + sys.exit(1) >> + >> > > Thanks, > Cole > > From crobinso at redhat.com Thu Jun 26 20:57:29 2008 From: crobinso at redhat.com (Cole Robinson) Date: Thu, 26 Jun 2008 16:57:29 -0400 Subject: [et-mgmt-tools] [PATCH] Added a --replace option to virt-image which allows it to replace an existing machine if it is current running or defined In-Reply-To: <4863DAE5.8070609@redhat.com> References: <1214502831.3896.145.camel@localhost.localdomain> <4863DAE5.8070609@redhat.com> Message-ID: <486402B9.6080000@redhat.com> Bryan Kearney wrote: > > David Lutterkort wrote: >> On Thu, 2008-06-26 at 12:47 -0400, Bryan M. Kearney @redhat.com wrote: >>> # HG changeset patch >>> # User "Bryan M. Kearney " >>> # Date 1214497967 14400 >>> # Node ID efba908eb79ad0bf2805c27f784de92578207f1b >>> # Parent 63aca2dbb3154a65505b1ccef080a8887742cef5 >>> Added a --replace option to virt-image which allows it to replace an existing machine if it is current running or defined >> Couldn't the same be achieved with a small shell script wrapper around >> the virt-image invocation, something like >> >> virsh list | grep -q $NAME && virsh destroy $NAME >> virt-image $IMAGE_XML >> >> It seems that this patch addresses a very specific use case (repeatedly >> starting a VM based on the same image.xml) >> >> Other than that it might be redundant though, the patch looks fine. >> > > For me, if I have a shutoff machine then 'virsh list' does not return > anything, but virt-manager shows me the shutoff machine. In addition, > virt-image will fail on an install because of the shutoff machine. > You need to use 'virsh list --all' to see inactive vms. Yeah, it annoys lots of people :) - Cole From crobinso at redhat.com Thu Jun 26 21:29:35 2008 From: crobinso at redhat.com (Cole Robinson) Date: Thu, 26 Jun 2008 17:29:35 -0400 Subject: [et-mgmt-tools] [PATCH] convert vmware machines to virt-image xml format In-Reply-To: <4863FF28.4080402@redhat.com> References: <4863A716.2050202@redhat.com> <4863A86B.5080403@redhat.com> <4863B165.1080809@redhat.com> <4863FF28.4080402@redhat.com> Message-ID: <48640A3F.3040600@redhat.com> Joey Boggs wrote: > I integrated the common cli options and all the other modifications, but > wasn't sure the best way to approach the para/full virt check removal > from the comments > > "If you use the above --paravirt/--hvm option change, you won't need > this check." Both before and after code snips below. > > I changed the if/else to evaluate the options for True on either > para/full, if there's something else you'd want to see please let me know > > > ------------------------------------------------------------------------------- > parser.add_option("-v", "--hvm", action="store_true", dest="fullvirt", > help=("This guest should be a fully virtualized > guest")) > parser.add_option("-p", "--paravirt", action="store_true", > dest="paravirt", > help=("This guest should be a paravirtualized guest")) > > > > > if options.paravirt is True: > virt_boot_template = """ > > %(vm_arch)s > > > > > > pygrub > > %(vm_pv_disks)s > """ > elif options.fullvirt is True: > > virt_boot_template = """ > > %(vm_arch)s > > > > > %(vm_fv_disks)s > """ > else: > print "Invalid virtualization type specified" > sys.exit(1) Sorry, I wasn't very clear. The unnecessary check I was talking about was the last sanity check, the "Invalid virtualization type". Since this is basically a boolean option (hvm or not), i'd do something like if options.paravirt: hvm = False else: hvm = True In main() and pass hvm explictly to the above function. - Cole From matt.baker at colocity.com Thu Jun 26 14:12:10 2008 From: matt.baker at colocity.com (Matt Baker) Date: Thu, 26 Jun 2008 23:42:10 +0930 Subject: [et-mgmt-tools] build over eth1 In-Reply-To: <4863916D.3050402@redhat.com> References: <4863916D.3050402@redhat.com> Message-ID: Hello Michael, >> >> The system was added to cobbler using the following command: >> >> cobbler system add --profile=CentOS-5.1-x86_64 --interface=0 -- >> ip=x..x.x.1 --mac=00:x:x:x:9A:F8 --gateway=x.x.x.254 --interface=1 >> --name=00:x:x:x:9A:F9 >> > This is fine, in fact, interface=0 is the default, so you don't > need to specify it. You can have any number of interfaces listed > here (well, up to 8 currently), and you do not need to enter all of > them into Cobbler, just the ones that you need to show up in the > PXE Linux tree and possibly for DHCP reservations. > > I assume the "x's" are just to not share the full details here and > aren't literal. Correct, I just removed the real life IP's from habit. The build network (eth1) are from private IP address space, and the eth0 interface IP's are public IP space. >> >> where the IP x.x.x.1 is on the public interface (ethernet addr >> 00:x:x:x:9A:F8) >> and ethernet 00:x:x:x:9A:F9 is on the build network interface >> >> >> Is this the "right" way to go about this, or should I instead be >> modifying profiles/ks files? >> > You need to do both. If you have two network interfaces, your > kickstart needs two network lines. > > Basically you can use variables like $ip_address_intf0 and so forth > in there to automate filling those in if you like, or just putting > in two lines to tell both interfaces to dhcp. You might also be > able to indicate the other interface should not be used there also. > > I'd also recommend looking into ksdevice=link for kernel options. > Ah, that's the hint I think I needed - and have now found the section in the wiki. I was not understanding the use of the $ip_address_intf0 variable. Obviously I wanted to keep the ks files as generic as possible (all the systems are pretty much built the same), with just the IP's changing. using the 'cobbler system add' seemed the best way to do this. thanks for your help, Matt From haerry+et at puzzle.ch Fri Jun 27 08:44:06 2008 From: haerry+et at puzzle.ch (=?ISO-8859-1?Q?Marcel_H=E4rry?=) Date: Fri, 27 Jun 2008 10:44:06 +0200 Subject: [et-mgmt-tools] [PATCH 1/1] Enhance mange_dns to optionally not (re)start bind In-Reply-To: <486295F4.9090705@redhat.com> References: <1214416846-14671-1-git-send-email-haerry+et@puzzle.ch> <48628AF1.80100@redhat.com> <48628CC0.20603@puzzle.ch> <48628E45.1020308@redhat.com> <486295F4.9090705@redhat.com> Message-ID: <4864A856.1000005@puzzle.ch> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi > http://git.fedorahosted.org/git/cobbler?p=cobbler;a=commitdiff;h=1e7b1b8ba5a982ca801a4d8246934a2315dd5931 > > > Here's my version of this to remove the references to the "_mode" code > that should have been pulled out earlier. I don't believe they were > hurting anything, and this will be in 1.0.3 when it comes out. > > I'll also merge this with devel. works for me perfectly. thanks for the nicer version. > If you would like to (on your end) manage these on external boxes, one > thing you might want to do is add your own version of the > restart-services trigger that would know where to copy the files and > could run the restart commands remotely via ssh (or even Func). I > think that was the original intent of Tim's patch when we moved the > trigger code outside of Sync into something that was more user editable. yeah, this is what we have done. greets Marcel -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIZKhVxqnHThA4pEkRAsytAKCGumoBdXRjQG1elLKad25u5hQjkQCaA5DD SToclzqUGilKAI6YZX/TkTk= =hm+Y -----END PGP SIGNATURE----- From bkearney at redhat.com Fri Jun 27 11:40:08 2008 From: bkearney at redhat.com (Bryan Kearney) Date: Fri, 27 Jun 2008 07:40:08 -0400 Subject: [et-mgmt-tools] [PATCH] Added a --replace option to virt-image which allows it to replace an existing machine if it is current running or defined In-Reply-To: <20080626184220.GB26347@redhat.com> References: <20080626184220.GB26347@redhat.com> Message-ID: <4864D198.3080702@redhat.com> Daniel P. Berrange wrote: > On Thu, Jun 26, 2008 at 12:47:27PM -0400, "Bryan M. Kearney "@redhat.com wrote: >> + if vm.ID() == -1: >> + logging.info("Removing old definition for image %s" %(self.name)) >> + vm.undefine() >> + else: >> + logging.info("Destroying image %s" %(self.name)) >> + vm.destroy() > > You don't want this to be an either / or conditional. If the VM exists > you should *always* attempt to undefine it - a running VM may or may > not have a config file > > So you want something closer to > > if vm.ID() != -1: > vm.destroy() > > try: > vm.undefine() > except: > pass > > Daniel I thought destroy did an undefine. I have made the change, will resend the patch. -- bk From bkearney at redhat.com Fri Jun 27 11:40:42 2008 From: bkearney at redhat.com (Bryan Kearney) Date: Fri, 27 Jun 2008 07:40:42 -0400 Subject: [et-mgmt-tools] [PATCH] Added a --replace option to virt-image which allows it to replace an existing machine if it is current running or defined In-Reply-To: <486402B9.6080000@redhat.com> References: <1214502831.3896.145.camel@localhost.localdomain> <4863DAE5.8070609@redhat.com> <486402B9.6080000@redhat.com> Message-ID: <4864D1BA.4080409@redhat.com> Cole Robinson wrote: > Bryan Kearney wrote: >> David Lutterkort wrote: >>> On Thu, 2008-06-26 at 12:47 -0400, Bryan M. Kearney @redhat.com wrote: >>>> # HG changeset patch >>>> # User "Bryan M. Kearney " >>>> # Date 1214497967 14400 >>>> # Node ID efba908eb79ad0bf2805c27f784de92578207f1b >>>> # Parent 63aca2dbb3154a65505b1ccef080a8887742cef5 >>>> Added a --replace option to virt-image which allows it to replace an existing machine if it is current running or defined >>> Couldn't the same be achieved with a small shell script wrapper around >>> the virt-image invocation, something like >>> >>> virsh list | grep -q $NAME && virsh destroy $NAME >>> virt-image $IMAGE_XML >>> >>> It seems that this patch addresses a very specific use case (repeatedly >>> starting a VM based on the same image.xml) >>> >>> Other than that it might be redundant though, the patch looks fine. >>> >> For me, if I have a shutoff machine then 'virsh list' does not return >> anything, but virt-manager shows me the shutoff machine. In addition, >> virt-image will fail on an install because of the shutoff machine. >> > > You need to use 'virsh list --all' to see inactive vms. Yeah, it annoys > lots of people :) > > - Cole > I still want the tool to do it for me :) -- bk From "Bryan M. Kearney " at redhat.com Fri Jun 27 11:52:52 2008 From: "Bryan M. Kearney " at redhat.com ("Bryan M. Kearney " at redhat.com) Date: Fri, 27 Jun 2008 07:52:52 -0400 Subject: [et-mgmt-tools] [PATCH 0 of 2] Updated Message-ID: Updated with comments from the Daniel. From "Bryan M. Kearney " at redhat.com Fri Jun 27 11:52:53 2008 From: "Bryan M. Kearney " at redhat.com ("Bryan M. Kearney " at redhat.com) Date: Fri, 27 Jun 2008 07:52:53 -0400 Subject: [et-mgmt-tools] [PATCH 1 of 2] Added suggestion from Daniel Berrange to always do the undefine In-Reply-To: Message-ID: <09f0cc44fc08b377aab6.1214567573@localhost.localdomain> # HG changeset patch # User "Bryan M. Kearney " # Date 1214567351 14400 # Node ID 09f0cc44fc08b377aab683e583e73294156c0e3c # Parent efba908eb79ad0bf2805c27f784de92578207f1b Added suggestion from Daniel Berrange to always do the undefine diff -r efba908eb79a -r 09f0cc44fc08 virtinst/Guest.py --- a/virtinst/Guest.py Thu Jun 26 12:32:47 2008 -0400 +++ b/virtinst/Guest.py Fri Jun 27 07:49:11 2008 -0400 @@ -937,12 +937,14 @@ class Guest(object): vm = self.conn.lookupByName(self.name) if removeOld: if vm is not None: - if vm.ID() == -1: + if vm.ID() != -1: + logging.info("Destroying image %s" %(self.name)) + vm.destroy() + try: logging.info("Removing old definition for image %s" %(self.name)) vm.undefine() - else: - logging.info("Destroying image %s" %(self.name)) - vm.destroy() + except: + pass else: if vm is not None: raise RuntimeError, _("Domain named %s already exists!") %(self.name,) From "Bryan M. Kearney " at redhat.com Fri Jun 27 11:52:54 2008 From: "Bryan M. Kearney " at redhat.com ("Bryan M. Kearney " at redhat.com) Date: Fri, 27 Jun 2008 07:52:54 -0400 Subject: [et-mgmt-tools] [PATCH 2 of 2] Added a --replace option to virt-image which allows it to replace an existing machine if it is current running or defined In-Reply-To: Message-ID: # HG changeset patch # User "Bryan M. Kearney " # Date 1214497967 14400 # Node ID efba908eb79ad0bf2805c27f784de92578207f1b # Parent 63aca2dbb3154a65505b1ccef080a8887742cef5 Added a --replace option to virt-image which allows it to replace an existing machine if it is current running or defined diff -r 63aca2dbb315 -r efba908eb79a virt-image --- a/virt-image Tue Jun 24 12:30:24 2008 -0400 +++ b/virt-image Thu Jun 26 12:32:47 2008 -0400 @@ -142,7 +142,10 @@ def parse_args(): help=_("The zero-based index of the boot record to use")) parser.add_option("", "--force", action="store_true", dest="force", help=_("Do not prompt for input. Answers yes where applicable, terminates for all other prompts"), - default=False) + default=False) + parser.add_option("", "--replace",action="store_true", dest="replace", + help=_("Overwrite, or destroy, an existing image with the same name"), + default=False) (options,args) = parser.parse_args() if len(args) < 1: @@ -211,7 +214,7 @@ def main(): try: print _("\n\nCreating guest %s...") % guest.name - dom = guest.start_install(None, progresscb) + dom = guest.start_install(None, progresscb, options.replace) if dom is None: print _("Guest creation failed") sys.exit(1) diff -r 63aca2dbb315 -r efba908eb79a virtinst/Guest.py --- a/virtinst/Guest.py Tue Jun 24 12:30:24 2008 -0400 +++ b/virtinst/Guest.py Thu Jun 26 12:32:47 2008 -0400 @@ -914,7 +914,7 @@ class Guest(object): "action": action } - def start_install(self, consolecb = None, meter = None): + def start_install(self, consolecb = None, meter = None, removeOld = False): """Do the startup of the guest installation.""" self.validate_parms() @@ -924,7 +924,7 @@ class Guest(object): self._prepare_install(meter) try: - return self._do_install(consolecb, meter) + return self._do_install(consolecb, meter, removeOld) finally: self._installer.cleanup() @@ -932,10 +932,20 @@ class Guest(object): self._install_disks = self.disks[:] self._install_nics = self.nics[:] - def _do_install(self, consolecb, meter): + def _do_install(self, consolecb, meter, removeOld = False): try: - if self.conn.lookupByName(self.name) is not None: - raise RuntimeError, _("Domain named %s already exists!") %(self.name,) + vm = self.conn.lookupByName(self.name) + if removeOld: + if vm is not None: + if vm.ID() == -1: + logging.info("Removing old definition for image %s" %(self.name)) + vm.undefine() + else: + logging.info("Destroying image %s" %(self.name)) + vm.destroy() + else: + if vm is not None: + raise RuntimeError, _("Domain named %s already exists!") %(self.name,) except libvirt.libvirtError: pass From matt.baker at colocity.com Fri Jun 27 13:14:04 2008 From: matt.baker at colocity.com (Matt Baker) Date: Fri, 27 Jun 2008 22:44:04 +0930 Subject: [et-mgmt-tools] build over eth1 In-Reply-To: <4863916D.3050402@redhat.com> References: <4863916D.3050402@redhat.com> Message-ID: <08ED723E-ABF0-4872-9B67-785029728336@colocity.com> >> >> The system was added to cobbler using the following command: >> >> cobbler system add --profile=CentOS-5.1-x86_64 --interface=0 -- >> ip=x..x.x.1 --mac=00:x:x:x:9A:F8 --gateway=x.x.x.254 --interface=1 >> --name=00:x:x:x:9A:F9 >> > This is fine, in fact, interface=0 is the default, so you don't > need to specify it. You can have any number of interfaces listed > here (well, up to 8 currently), and you do not need to enter all of > them into Cobbler, just the ones that you need to show up in the > PXE Linux tree and possibly for DHCP reservations. > Following on from this, I am finding an issue which I cannot seem to work out where I am going wrong. Issuing the command: # cobbler system add --name=test --profile=CentOS-5.1-x86_64 -- mac=00:15:60:ED:9A:F8 --ip=119.252.19.1 --gateway=119.252.19.254 -- interface=1 --mac=00:15:60:ED:9A:F9 --ip=10.2.25.1 # cobbler system report system : test profile : CentOS-5.1-x86_64 kernel options : {} kickstart : <> ks metadata : {} netboot enabled? : True owners : ['admin'] server : <> virt cpus : <> virt file size : <> virt path : <> virt ram : <> virt type : <> interface : intf0 mac address : ip address : hostname : gateway : subnet : virt bridge : dhcp tag : interface : intf1 mac address : 00:15:60:ED:9A:F9 ip address : 10.2.25.1 hostname : gateway : 119.252.19.254 subnet : virt bridge : dhcp tag : I have tried a few options, like leaving off the first --mac entry, putting in an --interface=0 statement etc, but in all cases it appears any options are only used for the 2nd interface. Leaving off the 2nd interface definitions: # cobbler system add --name=test --profile=CentOS-5.1-x86_64 -- mac=00:15:60:ED:9A:F8 --ip=119.252.19.1 --gateway=119.252.19.254 places all the configuration as expected under intf0 Anyone have a suggestion on where I am going wrong? Cheers, Matt From nombrandue at tsukinokage.net Fri Jun 27 14:56:29 2008 From: nombrandue at tsukinokage.net (Seann Clark) Date: Fri, 27 Jun 2008 09:56:29 -0500 Subject: [et-mgmt-tools] Cobbler and Ghost Message-ID: <4864FF9D.3070300@tsukinokage.net> All, I am new to the list, and have a working cobbler running perfectly save for kickstarts (I have no clue where to begin with that, but that is a different issue). What I am desiring to get going is the ability to set up a ghost for linux (G4L) image on cobbler to be able to netboot/ghost a drive to a network location, and I am wondering if anyone else has done this before, or if it would be advisable. I have a few systems that are laboriously configured that I would like to be able to periodically ghost before, and after an upgrade (in case something goes very wrong, like my last Fedora 7 --> Fedora 8 fun, where my install lost the LVM from the previous install and I had to fight it to get it to update, which isn't good at all). I have successfully completed manual cobbler assisted installs, and my install works pretty well, and I am looking at fleshing it out a bit to other O/s's besides just Linux (namely Solaris if it is supported, I haven't read into that too much) and am looking at a Windows remote installer (Unattended looked to be the best so far). If doing a network bootable Ghost system isn't feasible in Cobbler, would there be anything else that isn't commercial (I know Nortan Ghost does network ghosting with its server products) that I could use for this? -- Seann Clark Tsukinokage.net nombrandue at tsukinokage.net From matteo.concilio at gmail.com Fri Jun 27 14:58:19 2008 From: matteo.concilio at gmail.com (Matteo Concilio) Date: Fri, 27 Jun 2008 16:58:19 +0200 Subject: [et-mgmt-tools]Cobbler Web Interface: not able to login Message-ID: <1270e2cb0806270758u7d367e38qb85120e5973654a6@mail.gmail.com> Hi all, I'm using cobbler since 0.6 but now I have a problem I can't understand. This is a fresh mnimal install of EL 5.2 with cobbler taken from EPEL. I follewed this howto https://fedorahosted.org/cobbler/wiki/CobblerWebInterface as I always done, but I can't login. xmlrpc_rw is enabled fw is ok selinux is ok These are my confs and logs.... ------------------------------------ [root at mrwolf ~]# cat /etc/cobbler/modules.conf .... [authentication] module = authz_configfile [authorization] module = authz_allowall ..... ------------------------------------ [root at mrwolf ~]# cat /etc/cobbler/users.digest matteo:Cobbler:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx ------------------------------------ [root at mrwolf ~]# cat /var/log/httpd/error_log [Fri Jun 27 16:50:24 2008] [error] ------------------------------------ [root at mrwolf ~]# cat /var/log/cobbler/cobbler.log 2008-06-27 16:50:24,813 - remote - login attempt; user(matteo) 2008-06-27 16:50:24,814 - remote - Exception occured: exceptions.AttributeError 2008-06-27 16:50:24,815 - remote - Exception value: 'module' object has no attribute 'authenticate' 2008-06-27 16:50:24,816 - remote - Exception Info: File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 526, in _dispatch return method_handle(*params) File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 693, in login if self.__validate_user(login_user,login_password): File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 604, in __validate_user return self.api.authenticate(input_user,input_password) File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 413, in authenticate rc = self.authn.authenticate(self,user,password) ------------------------------------ What's the matter? Maybe python? -- Matteo Concilio From dlutter at redhat.com Fri Jun 27 15:25:34 2008 From: dlutter at redhat.com (David Lutterkort) Date: Fri, 27 Jun 2008 15:25:34 +0000 Subject: [et-mgmt-tools] [PATCH 0 of 2] Updated In-Reply-To: References: Message-ID: <1214580334.3896.212.camel@localhost.localdomain> On Fri, 2008-06-27 at 07:52 -0400, Bryan M. Kearney @redhat.com wrote: > Updated with comments from the Daniel. ACK (the patches are reversed though, and 2 needs to be applied before 1 and it should just be one cset) David From mdehaan at redhat.com Fri Jun 27 15:44:30 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Fri, 27 Jun 2008 11:44:30 -0400 Subject: [et-mgmt-tools] Cobbler and Ghost In-Reply-To: <4864FF9D.3070300@tsukinokage.net> References: <4864FF9D.3070300@tsukinokage.net> Message-ID: <48650ADE.1050209@redhat.com> Seann Clark wrote: > All, > > I am new to the list, and have a working cobbler running perfectly > save for kickstarts (I have no clue where to begin with that, but that > is a different issue). system-config-kickstart is a great way to build them. The other way is to install a system and look at /root/anaconda.ks that is left over after installation. > What I am desiring to get going is the ability to set up a ghost for > linux (G4L) image on cobbler to be able to netboot/ghost a drive to a > network location, and I am wondering if anyone else has done this > before, or if it would be advisable. I recently started a thread about exploring inclusion of imaging tools in Cobbler, so it can keep track of images and make that easier. So far udpcast and systemimager came up. I'm still looking into options as right now udpcast involves a bit of setup that I find a bit too involved for most users (including me) to get the target image working correctly. G4L might be another one to look at, though I'm suprised they haven't been talked to about the name yet. > I have a few systems that are laboriously configured that I would like > to be able to periodically ghost before, and after an upgrade (in case > something goes very wrong, like my last Fedora 7 --> Fedora 8 fun, > where my install lost the LVM from the previous install and I had to > fight it to get it to update, which isn't good at all). This looks like a good time to pick up a config management tool (something like Puppet), plus a backup tool, so that you can express your configuration in terms of kickstarts, configurations, and so forth. Imaging is a problem because you usually don't know what went into the image, so changing it can be kind of haphazard. That's why we want to encourage kickstart + config management wherever possible. That's not to say imaging doesn't have it's case... for Windows, that's one of the better options. > > I have successfully completed manual cobbler assisted installs, and > my install works pretty well, and I am looking at fleshing it out a > bit to other O/s's besides just Linux (namely Solaris if it is > supported, I haven't read into that too much) and am looking at a > Windows remote installer (Unattended looked to be the best so far). Imaging windows seems to be the way to go to me. That way other distributions are covered under the same proverbial umbrella. > > If doing a network bootable Ghost system isn't feasible in Cobbler, > would there be anything else that isn't commercial (I know Nortan > Ghost does network ghosting with its server products) that I could use > for this? > Any of the above... From mdehaan at redhat.com Fri Jun 27 15:47:53 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Fri, 27 Jun 2008 11:47:53 -0400 Subject: [et-mgmt-tools]Cobbler Web Interface: not able to login In-Reply-To: <1270e2cb0806270758u7d367e38qb85120e5973654a6@mail.gmail.com> References: <1270e2cb0806270758u7d367e38qb85120e5973654a6@mail.gmail.com> Message-ID: <48650BA9.9030404@redhat.com> Matteo Concilio wrote: > Hi all, I'm using cobbler since 0.6 but now I have a problem I can't understand. > This is a fresh mnimal install of EL 5.2 with cobbler taken from EPEL. > I follewed this howto > https://fedorahosted.org/cobbler/wiki/CobblerWebInterface as I always > done, but I can't login. > > xmlrpc_rw is enabled > fw is ok > selinux is ok > > These are my confs and logs.... > > ------------------------------------ > > [root at mrwolf ~]# cat /etc/cobbler/modules.conf > .... > [authentication] > module = authz_configfile > Authentication should be "authn_configfile". Authz is for authorization. From matteo.concilio at gmail.com Fri Jun 27 16:30:54 2008 From: matteo.concilio at gmail.com (Matteo Concilio) Date: Fri, 27 Jun 2008 18:30:54 +0200 Subject: [et-mgmt-tools]Cobbler Web Interface: not able to login In-Reply-To: <48650BA9.9030404@redhat.com> References: <1270e2cb0806270758u7d367e38qb85120e5973654a6@mail.gmail.com> <48650BA9.9030404@redhat.com> Message-ID: <1270e2cb0806270930w2eb1ab62m37172a27a0ca3984@mail.gmail.com> 2008/6/27 Michael DeHaan : > Authentication should be "authn_configfile". Authz is for authorization. It was a very stupid mistake! Maybe I should $ man keyboard Thanks! -- Matteo Concilio From nombrandue at tsukinokage.net Fri Jun 27 16:06:57 2008 From: nombrandue at tsukinokage.net (Seann Clark) Date: Fri, 27 Jun 2008 11:06:57 -0500 Subject: [et-mgmt-tools] Cobbler and Ghost In-Reply-To: <48650ADE.1050209@redhat.com> References: <4864FF9D.3070300@tsukinokage.net> <48650ADE.1050209@redhat.com> Message-ID: <48651021.2030706@tsukinokage.net> Michael DeHaan wrote: > Seann Clark wrote: >> All, >> >> I am new to the list, and have a working cobbler running perfectly >> save for kickstarts (I have no clue where to begin with that, but >> that is a different issue). > > system-config-kickstart is a great way to build them. > > The other way is to install a system and look at /root/anaconda.ks > that is left over after installation. Thanks, I will look over that. I have just started reviewing KS stuff for this (Automated Windows installs are easy for me, so I am not seeing much of a problem with this outside of the learning curve) > >> What I am desiring to get going is the ability to set up a ghost for >> linux (G4L) image on cobbler to be able to netboot/ghost a drive to a >> network location, and I am wondering if anyone else has done this >> before, or if it would be advisable. > > I recently started a thread about exploring inclusion of imaging tools > in Cobbler, so it can keep track of images and make that easier. > > So far udpcast and systemimager came up. I'm still looking into > options as right now udpcast involves a bit of setup that I find a bit > too involved for most users (including me) to get the target image > working correctly. G4L might be another one to look at, though I'm > suprised they haven't been talked to about the name yet. G4L is not too bad of a tool, it is an ncurses UI that looks and feels a lot like Nortan Ghost (I am used to Nortan, hence why I took that route) but I don't have enough foresight into cobbler to figure much out (Matter of fact, the only reason I started on Cobbler was it was a good PXE boot manager, and so far it works perfectly for that) I had recently come across systemimager but only glanced at that. My current project is a bit... complex and finding the way to do it so it works will be, well, kind of fun. Said project is to move my current server (web/media/cobbler) to a newer more robust 'real' server (going from 32 bit to 64 bit) and getting it set up again to match will be a nightmare, because this system has been my workhorse for about 3-4 years and I don't remember some of the dependencies I have set up for it, so I prob. will look into a configuration manager as mentioned below. > >> I have a few systems that are laboriously configured that I would >> like to be able to periodically ghost before, and after an upgrade >> (in case something goes very wrong, like my last Fedora 7 --> Fedora >> 8 fun, where my install lost the LVM from the previous install and I >> had to fight it to get it to update, which isn't good at all). > > This looks like a good time to pick up a config management tool > (something like Puppet), plus a backup tool, so that you can express > your configuration in terms of kickstarts, configurations, and so > forth. Imaging is a problem because you usually don't know what went > into the image, so changing it can be kind of haphazard. That's why > we want to encourage kickstart + config management wherever > possible. That's not to say imaging doesn't have it's case... for > Windows, that's one of the better options. >> >> I have successfully completed manual cobbler assisted installs, >> and my install works pretty well, and I am looking at fleshing it out >> a bit to other O/s's besides just Linux (namely Solaris if it is >> supported, I haven't read into that too much) and am looking at a >> Windows remote installer (Unattended looked to be the best so far). > > Imaging windows seems to be the way to go to me. That way other > distributions are covered under the same proverbial umbrella. I am currently testing Unattended with a couple of 'core' images. With this, I plan on taking a distro, and making a 'clean' install available for quick testing of install/performance in the Windows environment, and imaging my current running systems as a decent backup for this. >> >> If doing a network bootable Ghost system isn't feasible in >> Cobbler, would there be anything else that isn't commercial (I know >> Nortan Ghost does network ghosting with its server products) that I >> could use for this? >> > > Any of the above... > > > > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools > -- Seann Clark Tsukinokage.net nombrandue at tsukinokage.net From jboggs at redhat.com Fri Jun 27 18:09:47 2008 From: jboggs at redhat.com (Joey Boggs) Date: Fri, 27 Jun 2008 14:09:47 -0400 Subject: [et-mgmt-tools] [PATCH] convert vmware machines to virt-image xml format In-Reply-To: <48640A3F.3040600@redhat.com> References: <4863A716.2050202@redhat.com> <4863A86B.5080403@redhat.com> <4863B165.1080809@redhat.com> <4863FF28.4080402@redhat.com> <48640A3F.3040600@redhat.com> Message-ID: <48652CEB.7000507@redhat.com> Updated version based on comments. Cole, check the record validation section to see if that's fine. I just integrated it with the 2 checks that were already in place rather than creating another function. Cole Robinson wrote: > Joey Boggs wrote: > >> I integrated the common cli options and all the other modifications, but >> wasn't sure the best way to approach the para/full virt check removal >> from the comments >> >> "If you use the above --paravirt/--hvm option change, you won't need >> this check." Both before and after code snips below. >> >> I changed the if/else to evaluate the options for True on either >> para/full, if there's something else you'd want to see please let me know >> >> >> ------------------------------------------------------------------------------- >> parser.add_option("-v", "--hvm", action="store_true", dest="fullvirt", >> help=("This guest should be a fully virtualized >> guest")) >> parser.add_option("-p", "--paravirt", action="store_true", >> dest="paravirt", >> help=("This guest should be a paravirtualized guest")) >> >> >> >> >> if options.paravirt is True: >> virt_boot_template = """ >> >> %(vm_arch)s >> >> >> >> >> >> pygrub >> >> %(vm_pv_disks)s >> """ >> elif options.fullvirt is True: >> >> virt_boot_template = """ >> >> %(vm_arch)s >> >> >> >> >> %(vm_fv_disks)s >> """ >> else: >> print "Invalid virtualization type specified" >> sys.exit(1) >> > > Sorry, I wasn't very clear. The unnecessary check I was talking about > was the last sanity check, the "Invalid virtualization type". Since this > is basically a boolean option (hvm or not), i'd do something like > > if options.paravirt: > hvm = False > else: > hvm = True > > In main() and pass hvm explictly to the above function. > > - Cole > -------------- next part -------------- A non-text attachment was scrubbed... Name: virt-unpack.patch Type: text/x-patch Size: 8692 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: virt-unpack-pod.patch Type: text/x-patch Size: 2694 bytes Desc: not available URL: From ole.ersoy at gmail.com Sat Jun 28 15:58:23 2008 From: ole.ersoy at gmail.com (Ole Ersoy) Date: Sat, 28 Jun 2008 10:58:23 -0500 Subject: [et-mgmt-tools] [Man Page] Mirror Locally Option Correct? In-Reply-To: <48332009.501@imageworks.com> References: <48331B52.7090702@gmail.com> <48332009.501@imageworks.com> Message-ID: <48665F9F.2080909@gmail.com> Hi, Just looking at the Man page for the mirror-locally option on cobbler repo add. Normally I would think that if I set --mirror-locally=true, then cobbler will mirror the repo locally and use the local mirror, but the docs seem to indicate the reverse: ---------------------------------------------------------------- mirror-locally When true, specifies that this yum repo is to be referenced directly via kickstarts and not mirrored locally on the cobbler server. Only http:// and ftp:// mirror urls are supported when using --mirror-locally=1. ---------------------------------------------------------------- Thoughts? Thanks, - Ole From ole.ersoy at gmail.com Sat Jun 28 16:49:47 2008 From: ole.ersoy at gmail.com (Ole Ersoy) Date: Sat, 28 Jun 2008 11:49:47 -0500 Subject: [et-mgmt-tools] [Networking Configuration] File not generated? Message-ID: <48666BAB.2070908@gmail.com> Hi, After cobbler pxe installing Fedora 9, I noticed that there was no: /etc/sysconfig/networking/devices/ifcfg-eth0 File generated. In my kickstart file I had the following line: network --device eth0 --bootproto static --ip $ip_address - --netmask 255.255.255.0 --gateway 192.168.1.1 --nameserver 192.168.1.1 --hostname $hostname So I assumed that that would get translated into a configuration file on the newly installed system. I also tried creating one manually, and did did: ifdown eth0 ifup /etc/sysconfig/networking/devices/ifcfg-eth0 But the settings are ignored. Instead the router provides an IP address at from the very beginning of it's address pool, which is 192.168.1.100 (And the static configured IP is 192.168.1.2). So it seems like the host has been configured to always obtain a DHCP lease. Ideally the ifcfg-eth0 file would be generated and be used after the first reboot...any ideas on how to make this happen? Thanks, - Ole From matt.baker at colocity.com Sun Jun 29 14:54:30 2008 From: matt.baker at colocity.com (Matt Baker) Date: Mon, 30 Jun 2008 00:24:30 +0930 Subject: [et-mgmt-tools] build over eth1 In-Reply-To: <08ED723E-ABF0-4872-9B67-785029728336@colocity.com> References: <4863916D.3050402@redhat.com> <08ED723E-ABF0-4872-9B67-785029728336@colocity.com> Message-ID: <20CD7DE2-07FA-4368-82C0-C5C1F1A7FDAD@colocity.com> >>> >>> The system was added to cobbler using the following command: >>> >>> cobbler system add --profile=CentOS-5.1-x86_64 --interface=0 -- >>> ip=x..x.x.1 --mac=00:x:x:x:9A:F8 --gateway=x.x.x.254 -- >>> interface=1 --name=00:x:x:x:9A:F9 >>> >> This is fine, in fact, interface=0 is the default, so you don't >> need to specify it. You can have any number of interfaces listed >> here (well, up to 8 currently), and you do not need to enter all >> of them into Cobbler, just the ones that you need to show up in >> the PXE Linux tree and possibly for DHCP reservations. >> > > Following on from this, I am finding an issue which I cannot seem > to work out where I am going wrong. > > Issuing the command: > > # cobbler system add --name=test --profile=CentOS-5.1-x86_64 -- > mac=00:15:60:ED:9A:F8 --ip=119.252.19.1 --gateway=119.252.19.254 -- > interface=1 --mac=00:15:60:ED:9A:F9 --ip=10.2.25.1 > > > # cobbler system report > system : test > profile : CentOS-5.1-x86_64 > kernel options : {} > kickstart : <> > ks metadata : {} > netboot enabled? : True > owners : ['admin'] > server : <> > virt cpus : <> > virt file size : <> > virt path : <> > virt ram : <> > virt type : <> > interface : intf0 > mac address : > ip address : > hostname : > gateway : > subnet : > virt bridge : > dhcp tag : > interface : intf1 > mac address : 00:15:60:ED:9A:F9 > ip address : 10.2.25.1 > hostname : > gateway : 119.252.19.254 > subnet : > virt bridge : > dhcp tag : > > I have been trying to try a few different combinations, all with basically the same result. Until that it, I fired up the web interface to cobbler! Entering the 2nd interface information via the web interface works fine as the system report below shows. Has anyone managed to get more than one interface configured via the command line tool? system : test2 profile : CentOS-5.1-x86_64 kernel options : {} kickstart : <> ks metadata : {} netboot enabled? : True owners : ['admin'] server : <> virt cpus : <> virt file size : <> virt path : <> virt ram : <> virt type : <> interface : intf0 mac address : ip address : 119.252.19.2 hostname : test.com gateway : 119.252.19.254 subnet : 255.255.255.0 virt bridge : dhcp tag : interface : intf1 mac address : 00:15:60:ed:9a:f9 ip address : 10.1.25.45 hostname : gateway : subnet : virt bridge : dhcp tag : From robin-lists at robinbowes.com Sun Jun 29 17:14:38 2008 From: robin-lists at robinbowes.com (Robin Bowes) Date: Sun, 29 Jun 2008 18:14:38 +0100 Subject: [et-mgmt-tools] Re: build over eth1 In-Reply-To: References: <4863916D.3050402@redhat.com> Message-ID: Matt Baker wrote: > Hello Michael, > >>> >>> The system was added to cobbler using the following command: >>> >>> cobbler system add --profile=CentOS-5.1-x86_64 --interface=0 >>> --ip=x..x.x.1 --mac=00:x:x:x:9A:F8 --gateway=x.x.x.254 --interface=1 >>> --name=00:x:x:x:9A:F9 >>> >> This is fine, in fact, interface=0 is the default, so you don't need >> to specify it. You can have any number of interfaces listed here >> (well, up to 8 currently), and you do not need to enter all of them >> into Cobbler, just the ones that you need to show up in the PXE Linux >> tree and possibly for DHCP reservations. >> >> I assume the "x's" are just to not share the full details here and >> aren't literal. > > Correct, I just removed the real life IP's from habit. The build network > (eth1) are from private IP address space, and the eth0 interface IP's > are public IP space. > > >>> >>> where the IP x.x.x.1 is on the public interface (ethernet addr >>> 00:x:x:x:9A:F8) >>> and ethernet 00:x:x:x:9A:F9 is on the build network interface >>> >>> >>> Is this the "right" way to go about this, or should I instead be >>> modifying profiles/ks files? >>> >> You need to do both. If you have two network interfaces, your >> kickstart needs two network lines. >> >> Basically you can use variables like $ip_address_intf0 and so forth in >> there to automate filling those in if you like, or just putting in two >> lines to tell both interfaces to dhcp. You might also be able to >> indicate the other interface should not be used there also. >> >> I'd also recommend looking into ksdevice=link for kernel options. >> > > Ah, that's the hint I think I needed - and have now found the section in > the wiki. I was not understanding the use of the $ip_address_intf0 > variable. Obviously I wanted to keep the ks files as generic as possible > (all the systems are pretty much built the same), with just the IP's > changing. using the 'cobbler system add' seemed the best way to do this. Matt, I wrote a kickstart snippet that automates the network section of the kickstart file. Let me dig it out... Put this in /var/lib/cobbler/snippets/network_config: # Network information #for $n in $range(7) #set $ns = str($n) #if $getVar('mac_address_intf' + $ns, '') #if $getVar('ip_address_intf' + $ns, '') #set $network_stanza = \ '--bootproto=static' \ + ' --ip=' + $getVar('ip_address_intf' + $ns, '') \ + ' --netmask=' + $getVar('subnet_intf' + $ns, '') \ + ' --gateway=' + $getVar('gateway_intf' + $ns, '') #else #set $network_stanza = '--bootproto=dhcp' #end if #if $getVar('hostname_intf' + $ns, '') #set $hostname_stanza = '--hostname=' + $getVar('hostname_intf' + $ns, '') #else #set $hostname_stanza = '' #end if network $hostname_stanza $network_stanza --device=eth$n --onboot=on #end if #end for HTH, R. From mdehaan at redhat.com Mon Jun 30 00:15:27 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Sun, 29 Jun 2008 20:15:27 -0400 Subject: [et-mgmt-tools] build over eth1 In-Reply-To: <20CD7DE2-07FA-4368-82C0-C5C1F1A7FDAD@colocity.com> References: <4863916D.3050402@redhat.com> <08ED723E-ABF0-4872-9B67-785029728336@colocity.com> <20CD7DE2-07FA-4368-82C0-C5C1F1A7FDAD@colocity.com> Message-ID: <4868259F.8040106@redhat.com> > > > I have been trying to try a few different combinations, all with > basically the same result. Until that it, I fired up the web interface > to cobbler! > Entering the 2nd interface information via the web interface works > fine as the system report below shows. > Has anyone managed to get more than one interface configured via the > command line tool? You must split your edits into two commands as the edit command effects only one interface at a time: cobbler system edit --name=foo --interface=0 ... cobbler system edit --name=foo --interface=1 ... For complex configs, using the webapp is better. --Michael From mdehaan at redhat.com Mon Jun 30 00:21:21 2008 From: mdehaan at redhat.com (Michael DeHaan) Date: Sun, 29 Jun 2008 20:21:21 -0400 Subject: [et-mgmt-tools] [Networking Configuration] File not generated? In-Reply-To: <48666BAB.2070908@gmail.com> References: <48666BAB.2070908@gmail.com> Message-ID: <48682701.3000909@redhat.com> Ole Ersoy wrote: > Hi, > > After cobbler pxe installing Fedora 9, I noticed that there was no: > /etc/sysconfig/networking/devices/ifcfg-eth0 > > File generated. > > In my kickstart file I had the following line: > network --device eth0 --bootproto static --ip $ip_address - > --netmask 255.255.255.0 --gateway 192.168.1.1 > --nameserver 192.168.1.1 --hostname $hostname > > So I assumed that that would get translated into a configuration file > on the newly installed system. This is probably best asked at kickstart-list at redhat.com. There is also a corresponding (but less active) channel #kickstart on freenode. You probably want to read: http://fedoraproject.org/wiki/Anaconda/Kickstart FWIW, I thought the user editable configs are in "scripts" not "devices". --Michael From ole.ersoy at gmail.com Mon Jun 30 02:05:00 2008 From: ole.ersoy at gmail.com (Ole Ersoy) Date: Sun, 29 Jun 2008 21:05:00 -0500 Subject: [et-mgmt-tools] [Networking Configuration] File not generated? In-Reply-To: <48682701.3000909@redhat.com> References: <48666BAB.2070908@gmail.com> <48682701.3000909@redhat.com> Message-ID: <48683F4C.3000305@gmail.com> > This is probably best asked at kickstart-list at redhat.com. There is > also a corresponding (but less active) channel #kickstart on freenode. > > You probably want to read: > http://fedoraproject.org/wiki/Anaconda/Kickstart > > FWIW, I thought the user editable configs are in "scripts" not "devices". Hmmm - Now that you mentioned it, (and I took a peak) there's stuff in there :-). It even has onboot set to yes. The ifcfg-eth0 is in devices on my workstation, so I just assumed that was were it was supposed to end up. I'll play a little more. Thanks for the follow up avenues! Ole From matt.baker at colocity.com Mon Jun 30 02:12:39 2008 From: matt.baker at colocity.com (Matt Baker) Date: Mon, 30 Jun 2008 11:42:39 +0930 Subject: [et-mgmt-tools] build over eth1 In-Reply-To: <4868259F.8040106@redhat.com> References: <4863916D.3050402@redhat.com> <08ED723E-ABF0-4872-9B67-785029728336@colocity.com> <20CD7DE2-07FA-4368-82C0-C5C1F1A7FDAD@colocity.com> <4868259F.8040106@redhat.com> Message-ID: <7B92FF18-1808-4AB4-92F5-BE79EC7E0E22@colocity.com> Thanks Michael, that was the key I was missing ! Unfortunately, while the web interface is good I am looking to script as much of this as possible. Regards, Matt > >> >> >> I have been trying to try a few different combinations, all with >> basically the same result. Until that it, I fired up the web >> interface to cobbler! >> Entering the 2nd interface information via the web interface works >> fine as the system report below shows. >> Has anyone managed to get more than one interface configured via >> the command line tool? > > > You must split your edits into two commands as the edit command > effects only one interface at a time: > > cobbler system edit --name=foo --interface=0 ... > cobbler system edit --name=foo --interface=1 ... > > For complex configs, using the webapp is better. > > --Michael > > > _______________________________________________ > et-mgmt-tools mailing list > et-mgmt-tools at redhat.com > https://www.redhat.com/mailman/listinfo/et-mgmt-tools From crobinso at redhat.com Mon Jun 30 17:48:07 2008 From: crobinso at redhat.com (Cole Robinson) Date: Mon, 30 Jun 2008 13:48:07 -0400 Subject: [et-mgmt-tools] [PATCH] convert vmware machines to virt-image xml format In-Reply-To: <48652CEB.7000507@redhat.com> References: <4863A716.2050202@redhat.com> <4863A86B.5080403@redhat.com> <4863B165.1080809@redhat.com> <4863FF28.4080402@redhat.com> <48640A3F.3040600@redhat.com> <48652CEB.7000507@redhat.com> Message-ID: <48691C57.5070503@redhat.com> Joey Boggs wrote: > Updated version based on comments. > > Cole, check the record validation section to see if that's fine. I just > integrated it with the 2 checks that were already in place rather than > creating another function. > > Alright, I think this looks good. I'll probably commit sometime today or tomorrow. Thanks, Cole