Scott Henson | 2 Aug 2010 16:25
Picon
Favicon

Re: Question re: ticket #538

On Sat, 31 Jul 2010 13:07:25 -0400, Lars Kellogg-Stedman <lars <at> oddbit.com> wrote:
> I've run into this:
> 
>   https://fedorahosted.org/cobbler/ticket/538
> 
> This bug report is 8 months old, and I saw a mailing list post from May
> describing the same problem:
> 
>   http://www.mail-archive.com/cobbler <at> lists.fedorahosted.org/msg05416.html
> 
> Neither the email nor the bug report appears to have a followup.  I'm
> trying to figure out if things are working as designed or if this is
> really a bug, and if the latter, whether there's any work out there to
> resolve this.

Looking through the code, it seems that the intended behavior is for
distro to be inherited.  I've just tested this on a 2.0.4 install and it
seems to inherit properly.  The '~' listed in the output is indicative
of None being transferred across the xmlrpc layer with a EL4 host
involved.  What OS version are you running?  What cobbler version?

--

-- 
Scott Henson
Red Hat CIS Operator
WVU Alum BSAE/BSME
Lars Kellogg-Stedman | 2 Aug 2010 17:14
Gravatar

Re: Question re: ticket #538

This is cobbler 2.0.3 (2.0.3.1-3), running under CentOS 5.5.

Here's what I'm seeing.  I start with a parent profile:

# cobbler profile report --name=centos-5-i386-seas-server

Name                           : centos-5-i386-seas-server
Comment                        : SEAS server, no network users
DHCP Tag                       : default
Distribution                   : centos-5-i386
Enable PXE Menu?               : 1
Kernel Options                 : {}
Kernel Options (Post Install)  : {}
Kickstart                      : /var/lib/cobbler/kickstarts/SEAS.ks
Kickstart Metadata             : {}
Management Classes             : ['seas']
Name Servers                   : []
Name Servers Search Path       : []
Owners                         : ['lars']
Parent Profile                 :
Red Hat Management Key         : <<inherit>>
Red Hat Management Server      : <<inherit>>
Repos                          : ['centos-5-i386',
'centos-updates-5-i386', 'epel-5-i386', 'seas-5-i386']
Server Override                : <<inherit>>
Template Files                 : {}
Virt Auto Boot                 : 1
Virt Bridge                    : xenbr0
Virt CPUs                      : 1
Virt File Size(GB)             : 5
(Continue reading)

Gavin Reid | 2 Aug 2010 21:42

partitioning

Hi All , I am having problems with disk partitioning a section from my kickstart file follows

#get the number of hard disks and there namesset $(list-harddrives) let numd=$#/2 drive1=$1 drive2=$3 # Default data and rootvg size swapsize=8192 pv2size=1 pv1size=8196 if [ $numd = 1]; then # only one disk cat <<=EOpart > /tmp/part-include part /boot --fstype ext3 --size=100 --ondisk=$d1 --asprimary part pv.100 --size $pv1size --ondisk=$d1 --asprimary part pv.200 --size $pv2size --grow --ondisk=$d1 --asprimary volgroup rootvg pv.100 volgroup datavg pv.200 logvol / --fstype ext3 --vgname=rootvg --size=8196 --name=rootvol logvol /tmp --fstype ext3 --vgname=rootvg --size=548 --name=tmpvol logvol swap --fstype swap --vgname=rootvg --size=$swapsize --name=swapvol logvol /data --fstype ext3 --vgname datavg --size 1 --grow --name=nobackup EOpart else cat <<=EOpart > /tmp/part-include part /boot --fstype ext3 --size=100 --ondisk=$d1 --asprimary part pv.100 --size $pv1size --ondisk=$d1 --asprimary part pv.200 --size $pv2size --grow --ondisk=$d2 --asprimary part pv.300 --size 1 --grow --ondisk$d1 --asprimary volgroup rootvg pv.100 volgroup datavg pv.200 pv.300 logvol / --fstype ext3 --vgname=rootvg --size=8196 --name=rootvol logvol /tmp --fstype ext3 --vgname=rootvg --size=548 --name=tmpvol logvol swap --fstype swap --vgname=rootvg --size=$swapsize --name=swapvol logvol /data --fstype ext3 --vgname datavg --size 1 --grow --name=nobackup EOpart fi %include /tmp/part-include



yet the installer explodes at the include line ... it seem that the /tmp/part-include is not created ... any ideas or better methods of partitioning

_______________________________________________
cobbler mailing list
cobbler <at> lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler
Joseph Boyer Jr. | 2 Aug 2010 21:51
Favicon

RE: partitioning

It’s a dash not an equals sign. The dash is means tabs to EOpart

 

i.e.

 

     if [ \$numd = 1 ]; then #Physical Hardware

        cat <<-EOpart > /tmp/part-include

                part /boot --fstype ext3 --size=100 --ondisk=\$d1 --asprimary

                part pv.100000 --size \$pv1size --ondisk=\$d1 --asprimary

                part pv.200000 --size \$pv2size --grow --ondisk=\$d1 --asprimary

                volgroup rootvg pv.100000

                volgroup datavg pv.200000

                logvol / --fstype ext3 --vgname=rootvg --size=4192 --name=rootvol

                logvol /tmp --fstype ext3 --vgname=rootvg --size=548 --name=tmpvol

                logvol /var --fstype ext3 --vgname=rootvg --size=2048 --name=varvol

                logvol swap --fstype swap --vgname=rootvg --size=\$swapsize --name=swapvol

                logvol /appdata/cores --fstype ext3 --vgname=datavg --size=25600 --name=corevol

                logvol /appdata --fstype ext3 --vgname=datavg --size=1 --grow --name=appdatavol

        EOpart

      else

        cat <<-EOpart > /tmp/part-include

                part /boot --fstype ext3 --size=100

                part pv.100000 --size \$pv1size --ondisk=\$d1 --asprimary

                part pv.200000 --size \$pv2size --grow --ondisk=\$d2 --asprimary

                volgroup rootvg pv.100000

                volgroup datavg pv.200000

                logvol / --fstype ext3 --vgname=rootvg --size=4192 --name=rootvol

                logvol /tmp --fstype ext3 --vgname=rootvg --size=548 --name=tmpvol

                logvol /var --fstype ext3 --vgname=rootvg --size=2048 --name=varvol

                logvol swap --fstype swap --vgname=rootvg --size=\$swapsize --name=swapvol

                logvol /appdata/cores --fstype ext3 --vgname=datavg --size=25600 --name=corevol

                logvol /appdata --fstype ext3 --vgname=datavg --size=1 --grow --name=appdatavol

        EOpart

 

 

Joseph Boyer Jr. | ETS Engineering | jboyer <at> liquidnet.com | +1 646.660.8352 | www.liquidnet.com

 

From: cobbler-bounces <at> lists.fedorahosted.org [mailto:cobbler-bounces <at> lists.fedorahosted.org] On Behalf Of Gavin Reid
Sent: Monday, August 02, 2010 3:43 PM
To: cobbler <at> lists.fedorahosted.org
Subject: partitioning

 

Hi All , I am having problems with disk partitioning a section from my kickstart file follows

 

#get the number of hard disks and there names

set $(list-harddrives)

let numd=$#/2

drive1=$1

drive2=$3

 

# Default data and rootvg size

swapsize=8192

pv2size=1

pv1size=8196

 

if [ $numd = 1]; then # only one disk

        cat <<=EOpart > /tmp/part-include

                part /boot --fstype ext3 --size=100 --ondisk=$d1 --asprimary

                part pv.100 --size $pv1size --ondisk=$d1 --asprimary

                part pv.200 --size $pv2size --grow --ondisk=$d1 --asprimary

                volgroup rootvg pv.100

                volgroup datavg pv.200

                logvol / --fstype ext3 --vgname=rootvg --size=8196 --name=rootvol

                logvol /tmp --fstype ext3 --vgname=rootvg --size=548 --name=tmpvol

                logvol swap --fstype swap --vgname=rootvg --size=$swapsize --name=swapvol

               logvol /data --fstype ext3 --vgname datavg --size 1 --grow --name=nobackup

        EOpart

else

      cat <<=EOpart > /tmp/part-include

                part /boot --fstype ext3 --size=100 --ondisk=$d1 --asprimary

                part pv.100 --size $pv1size --ondisk=$d1 --asprimary

                part pv.200 --size $pv2size --grow --ondisk=$d2 --asprimary

               part pv.300 --size 1 --grow --ondisk$d1 --asprimary

                volgroup rootvg pv.100

                volgroup datavg pv.200 pv.300

                logvol / --fstype ext3 --vgname=rootvg --size=8196 --name=rootvol

                logvol /tmp --fstype ext3 --vgname=rootvg --size=548 --name=tmpvol

                logvol swap --fstype swap --vgname=rootvg --size=$swapsize --name=swapvol

               logvol /data --fstype ext3 --vgname datavg --size 1 --grow --name=nobackup

        EOpart

 

fi

%include /tmp/part-include

 

 

 

yet the installer explodes at the include line ... it seem that the /tmp/part-include is not created ... any ideas or better methods of partitioning

 

_______________________________________________
cobbler mailing list
cobbler <at> lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler
Joseph Boyer Jr. | 2 Aug 2010 21:55
Favicon

RE: partitioning

You also need to escape any variables that need to be determined when the scripts runs, also mentioned below

 

Joseph Boyer Jr. | ETS Engineering | jboyer <at> liquidnet.com | +1 646.660.8352 | www.liquidnet.com

 

From: Joseph Boyer Jr.
Sent: Monday, August 02, 2010 3:51 PM
To: cobbler <at> lists.fedorahosted.org
Subject: RE: partitioning

 

It’s a dash not an equals sign. The dash is means tabs to EOpart

 

i.e.

 

     if [ \$numd = 1 ]; then #Physical Hardware

        cat <<-EOpart > /tmp/part-include

                part /boot --fstype ext3 --size=100 --ondisk=\$d1 --asprimary

                part pv.100000 --size \$pv1size --ondisk=\$d1 --asprimary

                part pv.200000 --size \$pv2size --grow --ondisk=\$d1 --asprimary

                volgroup rootvg pv.100000

                volgroup datavg pv.200000

                logvol / --fstype ext3 --vgname=rootvg --size=4192 --name=rootvol

                logvol /tmp --fstype ext3 --vgname=rootvg --size=548 --name=tmpvol

                logvol /var --fstype ext3 --vgname=rootvg --size=2048 --name=varvol

                logvol swap --fstype swap --vgname=rootvg --size=\$swapsize --name=swapvol

                logvol /appdata/cores --fstype ext3 --vgname=datavg --size=25600 --name=corevol

                logvol /appdata --fstype ext3 --vgname=datavg --size=1 --grow --name=appdatavol

        EOpart

      else

        cat <<-EOpart > /tmp/part-include

                part /boot --fstype ext3 --size=100

                part pv.100000 --size \$pv1size --ondisk=\$d1 --asprimary

                part pv.200000 --size \$pv2size --grow --ondisk=\$d2 --asprimary

                volgroup rootvg pv.100000

                volgroup datavg pv.200000

                logvol / --fstype ext3 --vgname=rootvg --size=4192 --name=rootvol

                logvol /tmp --fstype ext3 --vgname=rootvg --size=548 --name=tmpvol

                logvol /var --fstype ext3 --vgname=rootvg --size=2048 --name=varvol

                logvol swap --fstype swap --vgname=rootvg --size=\$swapsize --name=swapvol

                logvol /appdata/cores --fstype ext3 --vgname=datavg --size=25600 --name=corevol

                logvol /appdata --fstype ext3 --vgname=datavg --size=1 --grow --name=appdatavol

        EOpart

 

 

Joseph Boyer Jr. | ETS Engineering | jboyer <at> liquidnet.com | +1 646.660.8352 | www.liquidnet.com

 

From: cobbler-bounces <at> lists.fedorahosted.org [mailto:cobbler-bounces <at> lists.fedorahosted.org] On Behalf Of Gavin Reid
Sent: Monday, August 02, 2010 3:43 PM
To: cobbler <at> lists.fedorahosted.org
Subject: partitioning

 

Hi All , I am having problems with disk partitioning a section from my kickstart file follows

 

#get the number of hard disks and there names

set $(list-harddrives)

let numd=$#/2

drive1=$1

drive2=$3

 

# Default data and rootvg size

swapsize=8192

pv2size=1

pv1size=8196

 

if [ $numd = 1]; then # only one disk

        cat <<=EOpart > /tmp/part-include

                part /boot --fstype ext3 --size=100 --ondisk=$d1 --asprimary

                part pv.100 --size $pv1size --ondisk=$d1 --asprimary

                part pv.200 --size $pv2size --grow --ondisk=$d1 --asprimary

                volgroup rootvg pv.100

                volgroup datavg pv.200

                logvol / --fstype ext3 --vgname=rootvg --size=8196 --name=rootvol

                logvol /tmp --fstype ext3 --vgname=rootvg --size=548 --name=tmpvol

                logvol swap --fstype swap --vgname=rootvg --size=$swapsize --name=swapvol

               logvol /data --fstype ext3 --vgname datavg --size 1 --grow --name=nobackup

        EOpart

else

      cat <<=EOpart > /tmp/part-include

                part /boot --fstype ext3 --size=100 --ondisk=$d1 --asprimary

                part pv.100 --size $pv1size --ondisk=$d1 --asprimary

                part pv.200 --size $pv2size --grow --ondisk=$d2 --asprimary

               part pv.300 --size 1 --grow --ondisk$d1 --asprimary

                volgroup rootvg pv.100

                volgroup datavg pv.200 pv.300

                logvol / --fstype ext3 --vgname=rootvg --size=8196 --name=rootvol

                logvol /tmp --fstype ext3 --vgname=rootvg --size=548 --name=tmpvol

                logvol swap --fstype swap --vgname=rootvg --size=$swapsize --name=swapvol

               logvol /data --fstype ext3 --vgname datavg --size 1 --grow --name=nobackup

        EOpart

 

fi

%include /tmp/part-include

 

 

 

yet the installer explodes at the include line ... it seem that the /tmp/part-include is not created ... any ideas or better methods of partitioning

 

_______________________________________________
cobbler mailing list
cobbler <at> lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler
Gavin Reid | 2 Aug 2010 22:29

RE: partitioning


Sorry my bad ... on the system the = in the heretoo's are -   , should have proof read what I cut and paste!
probably should also cut it from the source and not the rendered view too so the escapes are in too oh well .

oh and thanks Joseph for posting your example in the first place ;)

# get the number of hard disks and there names
set \$(list-harddrives)
let numd=\$#/2
drive1=\$1
drive2=\$3

# Default data and rootvg size
swapsize=8192
pv2size=1
pv1size=8196

if [ \$numd = 1]; then # only one disk
        cat <<- EOpart > /tmp/part-include
                part /boot --fstype ext3 --size=100 --ondisk=\$d1 --asprimary
                part pv.100 --size \$pv1size --ondisk=\$d1 --asprimary
                part pv.200 --size \$pv2size --grow --ondisk=\$d1 --asprimary
                volgroup rootvg pv.100
                volgroup datavg pv.200
                logvol / --fstype ext3 --vgname=rootvg --size=8196 --name=rootvol
                logvol /tmp --fstype ext3 --vgname=rootvg --size=548 --name=tmpvol
                logvol swap --fstype swap --vgname=rootvg --size=\$swapsize --name=swapvol
                logvol /data --fstype ext3 --vgname datavg --size 1 --grow --name=nobackup
        EOpart
else
      cat <<- EOpart > /tmp/part-include
                part /boot --fstype ext3 --size=100 --ondisk=\$d1 --asprimary
                part pv.100 --size \$pv1size --ondisk=\$d1 --asprimary
                part pv.200 --size \$pv2size --grow --ondisk=\$d2 --asprimary
                part pv.300 --size 1 --grow --ondisk\$d1 --asprimary
                volgroup rootvg pv.100
                volgroup datavg pv.200 pv.300
                logvol / --fstype ext3 --vgname=rootvg --size=8196 --name=rootvol
                logvol /tmp --fstype ext3 --vgname=rootvg --size=548 --name=tmpvol
                logvol swap --fstype swap --vgname=rootvg --size=\$swapsize --name=swapvol
                logvol /data --fstype ext3 --vgname datavg --size 1 --grow --name=nobackup
        EOpart

fi
Tom Brown | 4 Aug 2010 18:37

koan error - Error: Multiple systems matched

Hi

As a long time cobbler user i have never come across this issue before
and google is not really helping and i cant seem to track down the
issue.

I would normally just issue a koan -r or koan -D and all would be well
but since yesterday i have been seeing the following

# koan -D
- looking for Cobbler at http://10.10.10.10/cobbler_api
Error: Multiple systems matched

I can work around it by specifying the system name but normally it
would be matched on mac address so i dont see why it has just started
failing. This mac in question is not duplicated

[root <at> spacewalk-server systems.d]# grep -i 0A:14:5A:47:68:49 *
clientname:1.json:{"comment": "", "kickstart": "<<inherit>>",
"name_servers_search": [], "ks_meta": {"orgid": "1", "hostname":
clientname", "role": "a-role"}, "kernel_options_post": {}, "image":
"", "redhat_management_key": "<<inherit>>", "virt_path":
"<<inherit>>", "power_user": "", "kernel_options": {"ksdevice":
"0A:14:5A:47:68:49"}, "name_servers": [], "mtime": 1280763353.0280659,
"template_files": {}, "gateway": "10.10.10.1", "uid":
"MTI4MDMzMTc4My43NDU3MjA1ODEuNzA0NDM", "power_type": "ipmitool",
"virt_cpus": "<<inherit>>", "hostname": "client-name", "mgmt_classes":
[], "power_pass": "", "netboot_enabled": true, "profile":
"CentOS-5.3-xen-x86_64", "virt_bridge": "<<inherit>>", "parent": "",
"virt_type": "<<inherit>>", "interfaces": {"eth0": {"dhcp_tag": "",
"subnet": "255.255.255.0", "virt_bridge": "", "static_routes": [],
"dns_name": "", "ip_address": "10.10.10.11", "bonding": "", "static":
true, "bonding_opts": "", "mac_address": "0A:14:5A:47:68:49",
"bonding_master": ""}}, "power_address": "", "virt_file_size":
"<<inherit>>", "ctime": 1280331783.7378111, "owners": ["admin"],
"name": "clientname:1", "virt_ram": "<<inherit>>", "power_id": "",
"random_id": "1rJ6", "server": "10.10.10.10",
"redhat_management_server": "10.10.10.10", "depth": 2}

Any clues here as some of my tools have now broken!!

thanks
Christian Horn | 5 Aug 2010 15:24
Favicon

returncode of cobbler commandline operations always 0

Hi,

i try to add/delete/modify cobbler objects from a remote
box via ssh and discovered that returncodes are not even
local on the box i am executing the commands working:

$ cobbler system add --name=tester3 --hostname=tester3 \
>   --mac=00 --profile=rhel5u5_serv-x86_64 --ip=10.0.22.40
cobbler.cexceptions.CX:'invalid format for MAC address (00)'
# echo $?
0

The behaviour is expected, thats no valid mac.  Yet i
expected to get some returncode != 0.  Same behaviour for
trying to a system-object with an invalid ip.

Not sure what i could have done wrong.  Do i really have
to start querying/listing cobbler-objects to find out if
my last operation succeeded?

Christian
mark | 5 Aug 2010 18:31
Picon

Re: returncode of cobbler commandline operations always 0

On Thu, Aug 5, 2010 at 9:24 AM, Christian Horn <chorn <at> fluxcoil.net> wrote:
> Hi,
>
> i try to add/delete/modify cobbler objects from a remote
> box via ssh and discovered that returncodes are not even
> local on the box i am executing the commands working:
>
> $ cobbler system add --name=tester3 --hostname=tester3 \
>>   --mac=00 --profile=rhel5u5_serv-x86_64 --ip=10.0.22.40
> cobbler.cexceptions.CX:'invalid format for MAC address (00)'
> # echo $?
> 0
>
> The behaviour is expected, thats no valid mac.  Yet i
> expected to get some returncode != 0.  Same behaviour for
> trying to a system-object with an invalid ip.
>
> Not sure what i could have done wrong.  Do i really have
> to start querying/listing cobbler-objects to find out if
> my last operation succeeded?
>
>
> Christian

I was able to replicate this:

# cobbler system add --name "junk" --mac=00
cobbler.cexceptions.CX:'invalid format for MAC address (00)'
# echo $?
0

# cobbler version
Cobbler 2.0.3.1
  source: ?, ?
  build time: Mon Mar  1 20:08:11 2010

What version of Cobbler are you using?

mark
Christian Horn | 5 Aug 2010 18:48
Favicon

Re: returncode of cobbler commandline operations always 0

On Thu, Aug 05, 2010 at 12:31:48PM -0400, mark wrote:
> 
> I was able to replicate this:
> 
> # cobbler system add --name "junk" --mac=00
> cobbler.cexceptions.CX:'invalid format for MAC address (00)'
> # echo $?
> 0
> 
> # cobbler version
> Cobbler 2.0.3.1
>   source: ?, ?
>   build time: Mon Mar  1 20:08:11 2010

cobbler-2.0.1-1.noarch on rhel5u5 here..

Christian

Gmane