Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora/Linux Management Tools (http://www.linux-archive.org/fedora-linux-management-tools/)
-   -   Recursive distro delete trying to remove a profile more than once? (http://www.linux-archive.org/fedora-linux-management-tools/124304-recursive-distro-delete-trying-remove-profile-more-than-once.html)

Charles Duffy 07-14-2008 06:25 AM

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

Cole Robinson 07-14-2008 10:50 PM

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


All times are GMT. The time now is 05:56 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.