[Spacewalk-list] how to use 'file preservation'?

Yuriy Demchenko demchenko.ya at gmail.com
Fri Jan 30 07:44:00 UTC 2015


Thanks, filed a bug: https://bugzilla.redhat.com/show_bug.cgi?id=1187482

Yuriy Demchenko

On 01/29/2015 08:07 PM, Stephen Herr wrote:
> I agree that the mismatch between the initrd file created and the 
> wrong location passed to merge-rd.sh is the root of this problem. I'm 
> not sure how to fix it right now though, more investigation would be 
> needed. Please file a bug:
> https://bugzilla.redhat.com/enter_bug.cgi?product=Spacewalk
>
> -Stephen
>
> On 01/29/2015 10:56 AM, Yuriy Demchenko wrote:
>> Thanks Stephen for the tip, i tried to run it with -vvv and got this
>> error among all:
>>> Preserve files! : ['/etc/mongod.conf', '/etc/configsvr.conf',
>>> '/etc/mongos.conf']
>>> - looking for Cobbler at 
>>> http://spacewalk.mydomain.local:443/cobbler_api
>>> Traceback (most recent call last):
>>>   File "/usr/lib/python2.6/site-packages/koan/utils.py", line 568, in
>>> __try_connect
>>>     xmlrpc_server.ping()
>>>   File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
>>>     return self.__send(self.__name, args)
>>>   File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
>>>     verbose=self.__verbose
>>>   File "/usr/lib64/python2.6/xmlrpclib.py", line 1253, in request
>>>     return self._parse_response(h.getfile(), sock)
>>>   File "/usr/lib64/python2.6/xmlrpclib.py", line 1387, in 
>>> _parse_response
>>>     p.feed(response)
>>>   File "/usr/lib64/python2.6/xmlrpclib.py", line 601, in feed
>>>     self._parser.Parse(data, 0)
>>> ExpatError: syntax error: line 1, column 49
>>> - looking for Cobbler at 
>>> https://spacewalk.mydomain.local:443/cobbler_api
>>> - reading URL:
>>> http://spacewalk.mydomain.local/cblr/svc/op/ks/system/localhost.localdomain:1 
>>>
>>>
>>> install_tree: http://spacewalk.mydomain.local/ty/b5hJTnVG
>>> downloading initrd initrd.img to /boot/initrd.img_koan
>>> url=http://spacewalk.mydomain.local/cobbler/images/centos6:1:SpacewalkDefaultOrganization/initrd.img 
>>>
>>>
>>> - reading URL:
>>> http://spacewalk.mydomain.local/cobbler/images/centos6:1:SpacewalkDefaultOrganization/initrd.img 
>>>
>>>
>>> downloading kernel vmlinuz to /boot/vmlinuz_koan
>>> url=http://spacewalk.mydomain.local/cobbler/images/centos6:1:SpacewalkDefaultOrganization/vmlinuz 
>>>
>>>
>>> - reading URL:
>>> http://spacewalk.mydomain.local/cobbler/images/centos6:1:SpacewalkDefaultOrganization/vmlinuz 
>>>
>>>
>>> - ['/sbin/grubby', '--add-kernel', '/boot/vmlinuz_koan', '--initrd',
>>> '/boot/initrd.img_koan', '--args', '"ksdevice=link lang= text
>>> ks=http://spacewalk.mydomain.local/cblr/svc/op/ks/system/localhost.localdomain:1 
>>>
>>> kssendmac ipv6.disable=1 "', '--make-default', 
>>> '--title=kick1422545220']
>>> - reboot to apply changes
>>> CMD: ['/usr/sbin/merge-rd.sh', '/boot/initrd.img', '/boot/initrd.img',
>>> '/tmp/ks-tree-shadow']
>>> D: Sending back response(1, 'Error creating the new RAM disk',
>>> {'status': 1, 'stderr': '', 'stdout': 'Usage: /usr/sbin/merge-rd.sh
>>> SOURCERD DESTRD /path/to/merge/from\n'})
>> In spacewalk webinterface action marked as 'failed' with reason 'Error
>> creating the new RAM disk'entos6
>> /tmp/ks-tree-shadow with copied configs are in fact created, but it
>> seems 'merge-rd.sh' called with wrong parameters - there're no
>> '/boot/initrd.img', koan created '/boot/initrd.img_koan' instead.
>> Any ideas how to fix it?
>>
>> Yuriy Demchenko
>>
>> On 01/29/2015 06:01 PM, Stephen Herr wrote:
>>> File preservation will only work with re-provisioning (through
>>> Spacewalk, so not PXE booting), and it's expected that there's no
>>> change to the kickstart file.
>>>
>>> It should work with what you've tried though.
>>>
>>> File preservation works by saving the files listed to a particular
>>> place on the filesystem (/tmp/ks-tree-copy) when rhn_check picks up
>>> the reprovision action, and then the kickstart file always contains a
>>> section to copy files in that dir (if any) back onto the filesystem
>>> after the kickstart. So the kickstart file will not change because it
>>> always contains that section.
>>>
>>> Try scheduling another reprovision with that profile, running
>>> "rhn_check -vvv" by hand to pick up the action so you can see the
>>> verbose output on the console, and then 'shutdown -c' to cancel the
>>> three minute reboot timer so you can poke around. Between the console
>>> output and looking at /tmp/ks-tree-copy maybe that will give you a
>>> hint about what's wrong.
>>>
>>> -Stephen
>>>
>>> On 01/29/2015 08:17 AM, Yuriy Demchenko wrote:
>>>> Hi,
>>>>
>>>> I wonder how to use 'file preservation' function during kickstart? I
>>>> need to re-provision several systems via kickstart, preserving several
>>>> config files.
>>>> I've created file preservation list in 'system->kickstart->file
>>>> preservation', then checked this list in kickstart profile
>>>> '<profilename> ->system details->file preservation', clicked 'update
>>>> kickstart'
>>>> however, I cant see any changes to the raw kickstart file
>>>> and when I do re-provision with that kickstart (either via 'provision'
>>>> tab in SW, or just pxe-booting with selected profile) required configs
>>>> are not preserved.
>>>> What am I missing?
>>>> I'm using spacewalk-2.2
>>>>
>>>
>>> _______________________________________________
>>> Spacewalk-list mailing list
>>> Spacewalk-list at redhat.com
>>> https://www.redhat.com/mailman/listinfo/spacewalk-list
>>
>> _______________________________________________
>> Spacewalk-list mailing list
>> Spacewalk-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/spacewalk-list
>
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list




More information about the Spacewalk-list mailing list