Re: Recursive distro delete trying to remove a profile more than once?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux