petermity | 1 Apr 2011 09:36

Re: Setting up new Cobbler server from existing one

Scott Henson <shenson <at> redhat.com> wrote:

>On Mon, 28 Mar 2011 23:52:24 -0700, petermity <6t12-n6js <at> dea.spamcon.org> wrote:
>> If I have an existing Cobbler server all set up, is there an easy
>> way to copy all of the distros, profiles, and other Cobbler
>> aspects from it to a freshly created unit?
>> 
>> Could I just copy /etc/cobbler, /var/www/cobbler, and
>> /var/lib/cobbler to the new machine and then do cobbler sync?
>
>That might work, but you will likely run into problems. The correct way
>to do it is to use 'cobbler replicate --master'. Generally you would
>want to setup the cobbler settings file, start up cobblerd and then do
>that. This is the way I do it, and it allows you to do all kinds of fun
>things with selecting what you want brought down.

Thanks, I wasn't aware of replicate (it's not mentioned in
Cobbler's top-level help).  The documentation at:

https://fedorahosted.org/cobbler/wiki/ReplicateMaster

is sparse, not enough examples of exactly how to use it.
Apparently there used to be a parameter "--full-data-sync" -
that's what I want to do.  Would this be the equivalent (since I
have no systems or images)?:

cobbler replicate --master=$MASTER_SERVER_IP --distros=* --profiles=* --repos=*

When looking into it, I ran across:

(Continue reading)

petermity | 1 Apr 2011 09:49

Re: cobbler check - how disable warnings?

Scott Henson <shenson <at> redhat.com> wrote:

>On Mon, 28 Feb 2011 22:12:29 -0800, petermity <6t12-n6js <at> dea.spamcon.org> wrote:
>> Perhaps have a way to disable selected warnings. something like some
>> compilers or lints allow pinpoint control of warnings.
>> 
>> Or perhaps easier for you and more general, have a configuration item in
>> the settings file that lets a user put in a set of regular expressions to
>> filter out before reporting.
>> 
>> I can understand where it's not considered a big deal, but to me it's like
>> compiler output - some people ignore warnings, but I like to have it
>> completely clean, because then it's trivial to spot real problems.
>
>I'm thinking a file in /etc/cobbler that lets you 'ack' specific
>warnings from cobbler check? I need to dig into cobbler check at some
>point in the future, so I'll put this on my todo list, unless someone
>beats me to it.

Thanks - I just submitted an enhancement ticket to help track this:
https://fedorahosted.org/cobbler/ticket/653
petermity | 1 Apr 2011 10:13

Re: Add descriptions to PXE menu entries?

petermity <6t12-n6js <at> dea.spamcon.org> wrote:

>Scott Henson <shenson <at> redhat.com> wrote:
>
>>On Wed, 2 Mar 2011 08:15:32 -0500, Jonathan Sabo <jsabo <at> criminal.org> wrote:
>>> On Wed, Mar 2, 2011 at 7:58 AM, Jonathan Sabo <jsabo <at> criminal.org> wrote:
>>> > It's clearly not intended to be restricted to just Cobbler developers
>>> > and maintainers.  It's not hidden from the user at all and there are
>>> > some things in Cobbler that are indeed kept from the users.  The
>>> > comments field is not one of them.  In fact it's made available for
>>> > user's to enter information (notes, descriptions, comments) through
>>> > out the entire hierarchy of the objects in the Web UI, cli, and api.
>>> >
>>> 
>>> When you say users you mean people looking at a pxe menu don't you and
>>> not people using the Cobbler Web UI or cli?  Those would be your
>>> "maintainers"?  I can understand wanting the comments field all for
>>> yourself and a separate one in that case but I also don't think we
>>> should have lots of fields with an overlapping purpose.
>>
>>Yeah, duplication would be my problem as well. The thing is, that once
>>the comment is exposed in the pxe template, you can process it in
>>whatever way you see fit. So if you want to have some complex string
>>data type in there that python/cheetah can parse and then extract the
>>description, that would work.
>>
>>Having said the above, we have talked in the past about a misc
>>field. Something that could contain a python/json dictionary and allow
>>the user to stuff whatever they want in there. I'd be fine adding
>>something like this in to make the above easier to do.
(Continue reading)

petermity | 1 Apr 2011 10:25

Re: How to force failure?

Scott Henson <shenson <at> redhat.com> wrote:

>On Wed, 02 Mar 2011 00:15:01 -0800, petermity <6t12-n6js <at> dea.spamcon.org> wrote:
>> How can I force a failure on a bad condition, so that "cobbler
>> profile getks" fails with a traceback (and the actual kickstart
>> fails, and validateks fails too)?
>> 
>> For instance, I don't want to proceed if some variable is not set:
>> 
>> #if $getVar('myvar','') != ''
>> # ... do something with $myvar
>> #else
>> # Somehow throw an error to abort, e.g.:
>> #error "The profile must define 'myvar'"
>> #end if
>
>I believe the directives you need are #assert and #raise. Though they
>are probably disabled by safe templating. I'll include one of them in
>the next release of cobbler (along with the ability to modify the
>whitelist in the settings file).

To help track this, I submitted an enhacement issue:
https://fedorahosted.org/cobbler/ticket/656
petermity | 1 Apr 2011 10:31

Re: validateks says errors when none exist

petermity <6t12-n6js <at> dea.spamcon.org> wrote:

>Scott Henson <shenson <at> redhat.com> wrote:
>
>>On Mon, 07 Mar 2011 23:57:41 -0800, petermity <6t12-n6js <at> dea.spamcon.org> wrote:
>>> Scott Henson <shenson <at> redhat.com> wrote:
>>> 
>>> >On Fri, 04 Mar 2011 00:16:24 -0800, petermity <6t12-n6js <at> dea.spamcon.org> wrote:
>>> >> In 2.0.10, when validateks completes I get:
>>> >> 
>>> >> *** potential errors detected in kickstarts ***
>>> >> *** TASK COMPLETE ***
>>> >> 
>>> >> even when every profile shows empty for stdout and stderr, and no
>>> >> other complaints are shown, e.g. all of them look like:
>>> >
>>> >Looking through the code, I'm not sure why that would happen. The only
>>> >thought I have is that ksvalidate is returning a non-zero exit code for
>>> >some reason. Beyond that, I'm a little stumped.
>>> 
>>> I manually ran ksvalidator against the getks output for each of
>>> my profiles.  I have to provide a -v parameter for the version of
>>> Red Hat kickstart to validate against, e.g. "-v RHEL5", to get
>>> ksvalidator to work properly.  I don't understand how you can run
>>> the command without doing so.  For instance, for one profile the
>>> validateks output shows:
>>
>>Ok, that makes sense. I'll see about getting a fix commited for this. Thanks.
>
>It doesn't really make sense to me - the stdout or stderr shown
(Continue reading)

petermity | 1 Apr 2011 10:51

Re: Indicate or filter hidden profiles

petermity <6t12-n6js <at> dea.spamcon.org> wrote:

>Scott Henson <shenson <at> redhat.com> wrote:
>
>>On Fri, 04 Mar 2011 23:59:51 -0800, petermity <6t12-n6js <at> dea.spamcon.org> wrote:
>>> Scott Henson <shenson <at> redhat.com> wrote:
>>> 
>>> >On Fri, 04 Mar 2011 00:37:23 -0800, petermity <6t12-n6js <at> dea.spamcon.org> wrote:
>>> >> When $enable_menu is false for a profile, it would be nice for
>>> >> "cobbler profile list" and "cobbler list" to indicate or filter
>>> >> out hidden ones.
>>> >> 
>>> >> It could be indicated by " [hidden]" or an asterisk or something
>>> >> following the profile name.
>>> >> 
>>> >> Or hidden ones could be filtered out, via a settings entry and/or
>>> >> a command-line option to override the current setting to show or
>>> >> not show them.
>>> >
>>> >I'm not sure I see the point in this. Could you explain why you want that?
>>> 
>>> I would like to know what will be listed on the PXE boot menu,
>>> without having to actually go to the lab to boot a target, or
>>> look at each profile's dumpvars or report to see if it is
>>> menu-enabled or not.
>>> 
>>> Also, it just reduces clutter - you see what's pertinent.
>>> 
>>> I don't want to delete the default profiles created by import, or
>>> some of my test profiles, because they are useful for reference
(Continue reading)

petermity | 1 Apr 2011 11:02

Re: How to clear "cobbler status"?

petermity <6t12-n6js <at> dea.spamcon.org> wrote:

>Scott Henson <shenson <at> redhat.com> wrote:
>
>>On Mon, 07 Mar 2011 22:33:15 -0800, petermity <6t12-n6js <at> dea.spamcon.org> wrote:
>>> The "cobbler status" command is handy to see when builds are
>>> running/finished.  However, the display can be cluttered by units
>>> that finished building (or hung/failed) days/weeks ago, even if
>>> the Cobbler server is rebooted.  Is there a way to start fresh?
>>> 
>>> Related: is there a wget command or some other method to tell
>>> Cobbler that a failure occurred in the %post section?  Something
>>> analogous to the $kickstart_done, maybe a $kickstart_failed?
>>
>>I believe you would need to rotate /var/log/cobbler/install.log and
>>restart cobblerd.
>
>Thanks, but I renamed install.log and cobbler.log, restarted
>cobblerd, no difference, rebooted the machine, no difference. It
>must be getting the information from elsewhere.

I figured this out - it's not just looking in install.log, but in all of
the rotated install.log* it finds, such as install.log-20110327.  Moving
all such logs elsewhere, it now shows the empty list.
Byron Pezan | 1 Apr 2011 16:47
Favicon

RE: Setting up new Cobbler server from existing one

I just recently migrated to a new server using replication.  I used a similar command to what you listed below:

cobbler replicate --master=$MASTER_SERVER_IP --distros=* --profiles=* --repos=* --systems=*

I think replicate syncs all data by default unless you use the --omit-data option.

The only real issues I had was with custom triggers that couldn't run on the slave system due to config
issues, which breaks the replication unless you disable them on the master first then re-enable them
after the replication.  I also had an issue where the profile names associated with systems were using the
wrong case compared to the profiles themselves.  This was resolved by changing the profiles on these
systems to match the correct case.  After all of this the new cobbler server worked fine, even puppet
external node classifiers.

HTH,

byron

-----Original Message-----
From: cobbler-bounces <at> lists.fedorahosted.org [mailto:cobbler-bounces <at> lists.fedorahosted.org]
On Behalf Of petermity
Sent: Friday, April 01, 2011 3:37 AM
To: cobbler <at> lists.fedorahosted.org
Subject: Re: Setting up new Cobbler server from existing one

Scott Henson <shenson <at> redhat.com> wrote:

>On Mon, 28 Mar 2011 23:52:24 -0700, petermity <6t12-n6js <at> dea.spamcon.org> wrote:
>> If I have an existing Cobbler server all set up, is there an easy
>> way to copy all of the distros, profiles, and other Cobbler
>> aspects from it to a freshly created unit?
(Continue reading)

Joe Linoff | 5 Apr 2011 04:22

cobbler mem-max vs mem-set question

Hi Folks:

Cobbler is an awesome tool! Thank you.

I would like to set up my VM's with their maximum memory different than
their set memory. This is because they may migrate to a hypervisor with
more RAM at some time in the future and I would like to avoid changing
them.

On the command line I would use commands like "xm mem-set ..." and "xm
mem-max ...".

In the cobbler GUI there only appears to be one setting for virtual
memory which sets both.

How can I set both max and set memory in cobbler/koan? 

If that is not possible, can you suggest a way to do it before the VM
provisioned?

Perhaps something like this would work on hypervisor assuming the
vm-0103 was defined in cobbler with 4096MB of RAM?

    Dom0# koan --virt --nogfx --system vm-0103
    Dom0# xm mem-set vm-0103 2048   # use half the RAM for now
    Dom0# virsh start vm-0103

Thanks,

Joe
(Continue reading)

Scott Henson | 5 Apr 2011 18:39
Picon
Favicon

Re: cobbler mem-max vs mem-set question

On Mon, 4 Apr 2011 19:22:32 -0700, "Joe Linoff" <jlinoff <at> tabula.com> wrote:
> Hi Folks:
> 
> Cobbler is an awesome tool! Thank you.
> 
> I would like to set up my VM's with their maximum memory different than
> their set memory. This is because they may migrate to a hypervisor with
> more RAM at some time in the future and I would like to avoid changing
> them.
> 
> On the command line I would use commands like "xm mem-set ..." and "xm
> mem-max ...".
> 
> In the cobbler GUI there only appears to be one setting for virtual
> memory which sets both.
> 
> How can I set both max and set memory in cobbler/koan? 
> 
> If that is not possible, can you suggest a way to do it before the VM
> provisioned?
> 
> Perhaps something like this would work on hypervisor assuming the
> vm-0103 was defined in cobbler with 4096MB of RAM?
> 
>     Dom0# koan --virt --nogfx --system vm-0103
>     Dom0# xm mem-set vm-0103 2048   # use half the RAM for now
>     Dom0# virsh start vm-0103

It all sounds possible. However, it would take a change to cobbler to
add the new field (I would actually add the max mem field) and then to
(Continue reading)


Gmane