FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora/Linux Management Tools

 
 
LinkBack Thread Tools
 
Old 07-14-2008, 06:25 AM
Charles Duffy
 
Default Recursive distro delete trying to remove a profile more than once?

Howdy. I'm trying to remove a number of distros and profiles, and
hitting exceptions similar to the following:


Traceback (most recent call last):
File "cobbler_sync.py", line 132, in run
cobbler_api.distros().remove(distro.name, with_delete=True,
recursive=True)
File
"/usr/lib/python2.4/site-packages/cobbler/collection_distros.py", line
51, in remove

self.config.api.remove_profile(k, recursive=True)
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 176, in
remove_profile

return self._config.profiles().remove(ref.name, recursive=recursive)
File
"/usr/lib/python2.4/site-packages/cobbler/collection_profiles.py", line
70, in remove

raise CX(_("cannot delete an object that does not exist: %s") % name)
cobbler.cexceptions.CX: 'cannot delete an object that does not exist:
centos-5.1-xen-x86_64'



The calling code looks like the following:

for distro in list(cobbler_api.distros()):
if not cobbler_api.find_distro(distro.name):
continue # we've been removed by a recursive delete
if not distro.name in desired_distro_list:
logger.info('removing distro %r' % (distro.name,))
if not noop:
cobbler_api.distros().remove(distro.name, with_delete=True,
recursive=True)


This issue is reproduced after the import of a new distribution.

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 07-14-2008, 10:50 PM
Cole Robinson
 
Default Recursive distro delete trying to remove a profile more than once?

Charles Duffy wrote:
> Howdy. I'm trying to remove a number of distros and profiles, and
> hitting exceptions similar to the following:
>
> Traceback (most recent call last):
> File "cobbler_sync.py", line 132, in run
> cobbler_api.distros().remove(distro.name, with_delete=True,
> recursive=True)
> File
> "/usr/lib/python2.4/site-packages/cobbler/collection_distros.py", line
> 51, in remove
> self.config.api.remove_profile(k, recursive=True)
> File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 176, in
> remove_profile
> return self._config.profiles().remove(ref.name, recursive=recursive)
> File
> "/usr/lib/python2.4/site-packages/cobbler/collection_profiles.py", line
> 70, in remove
> raise CX(_("cannot delete an object that does not exist: %s") % name)
> cobbler.cexceptions.CX: 'cannot delete an object that does not exist:
> centos-5.1-xen-x86_64'
>
>
> The calling code looks like the following:
>
> for distro in list(cobbler_api.distros()):
> if not cobbler_api.find_distro(distro.name):
> continue # we've been removed by a recursive delete
> if not distro.name in desired_distro_list:
> logger.info('removing distro %r' % (distro.name,))
> if not noop:
> cobbler_api.distros().remove(distro.name, with_delete=True,
> recursive=True)
>
> This issue is reproduced after the import of a new distribution.
>

Cobbler moved to its own list at:

https://fedorahosted.org/mailman/listinfo/cobbler

So you'll probably want to move your question there.

- Cole

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 

Thread Tools




All times are GMT. The time now is 06:57 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org