Project

General

Profile

Bug #14583

Reword taxonomy orphans validation error

Added by Thomas McKay over 4 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Organizations and Locations
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1326101
Description of problem:
When trying to add a hostgroup to an organization using hammer it fails stating that "Locations you cannot remove locations that are used by hosts or inherited.".

Version-Release number of selected component (if applicable):
satellite-6.2.0-7.0.beta.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Create a new user with admin permissions
2. Using the new user from above
1. Create a new organization
2. Clone and upload manifest
3. Create a new lifecycle environment
4. Create a custom product
5. Create a custom YUM repository
6. Create a custom PUPPET repository
7. Enable a RedHat repository
8. Synchronize the three repositories
9. Create a new content view
10. Associate the three repositories to new content view
11. Publish content view
12. Promote content view to the lifecycle environment
13. Create a new activation key
14. Add the products to the activation key
15. Create a new libvirt compute resource
16. Create a new subnet
17. Create a new domain
18. Create a new hostgroup and associate previous entities to it

OBS.: All steps add the created entities to the Organization create on step 2.1.

Actual results:
Adding the hostgroup to the organization fails stating that "Locations you cannot remove locations that are used by hosts or inherited.".

Expected results:
The hostgroup is added to the organization.

Additional info:

Log with all commands run:

  1. LANG=en_US.UTF-8 hammer -v -u admin -p changeme --output=csv user create --login="e6gnfe" --admin="true" --auth-source-id="1" --lastname="TuVJFfS7Mm" --mail="" --password="Vm59H6mWYc" --firstname="7kv9gUOnvR"
    Message,Id
    User [e6gnfe] created,15
  1. LANG=en_US.UTF-8 hammer -v -u admin -p changeme user info --id="15"
    Id: 15
    Login: e6gnfe
    Name: 7kv9gUOnvR TuVJFfS7Mm
    Email:
    Admin: yes
    Authorized by: Internal
    Locale: default
    Timezone: default
    Last login:
    Default organization:
    Default location:
    Roles:
    Anonymous
    User groups:

Created at: 2016/04/11 20:04:34
Updated at: 2016/04/11 20:04:34

  1. LANG=en_US.UTF-8 hammer -v -u e6gnfe -p Vm59H6mWYc --output=csv organization create --name="yY9SiN5xbt"
    Message,Id,Name
    Organization created,144,yY9SiN5xbt
  1. LANG=en_US.UTF-8 hammer -v -u e6gnfe -p Vm59H6mWYc organization info --id="144"
    Id: 144
    Name: yY9SiN5xbt
    Users:

Smart proxies:
rhsm-qe-4.rhq.lab.eng.bos.redhat.com
Subnets:

Compute resources:

Installation media:

Templates:
Alterator default (provision)
Alterator default finish (finish)
Alterator default PXELinux (PXELinux)
alterator_pkglist ()
Atomic Kickstart default (provision)
AutoYaST default (provision)
AutoYaST default iPXE (iPXE)
AutoYaST default PXELinux (PXELinux)
AutoYaST SLES default (provision)
Boot disk iPXE - generic host (Bootdisk)
Boot disk iPXE - host (Bootdisk)
chef_client ()
coreos_cloudconfig ()
CoreOS provision (provision)
CoreOS PXELinux (PXELinux)
Discovery Red Hat kexec (kexec)
epel ()
fix_hosts ()
FreeBSD (mfsBSD) finish (finish)
FreeBSD (mfsBSD) provision (provision)
FreeBSD (mfsBSD) PXELinux (PXELinux)
freeipa_register ()
Grubby default (script)
http_proxy ()
Jumpstart default (provision)
Jumpstart default finish (finish)
Jumpstart default PXEGrub (PXEGrub)
Junos default finish (finish)
Junos default SLAX (provision)
Junos default ZTP config (ZTP)
Katello Atomic Kickstart Default (provision)
Katello Kickstart Default (provision)
Katello Kickstart Default Finish (finish)
Katello Kickstart Default User Data (user_data)
Kickstart default (provision)
Kickstart default finish (finish)
Kickstart default iPXE (iPXE)
Kickstart default PXELinux (PXELinux)
Kickstart default user data (user_data)
kickstart_networking_setup ()
Kickstart RHEL default (provision)
NX-OS default POAP setup (POAP)
Preseed default (provision)
Preseed default finish (finish)
Preseed default iPXE (iPXE)
Preseed default PXELinux (PXELinux)
Preseed default user data (user_data)
preseed_networking_setup ()
puppet.conf ()
PXEGrub default local boot (PXEGrub)
PXELinux chain iPXE (PXELinux)
PXELinux chain iPXE UNDI (PXELinux)
PXELinux default local boot (PXELinux)
PXELinux default memdisk (PXELinux)
PXELinux global default (PXELinux)
redhat_register ()
remote_execution_ssh_keys ()
saltstack_minion ()
subscription_manager_registration ()
UserData default (user_data)
WAIK default PXELinux (PXELinux)
Domains:

Environments:

Hostgroups:

Parameters:

Created at: 2016/04/11 20:04:41
Updated at: 2016/04/11 20:04:41
Label: yY9SiN5xbt
Description:
Red Hat Repository URL: https://cdn.redhat.com

  1. LANG=en_US.UTF-8 hammer -v -u e6gnfe -p Vm59H6mWYc --output=csv subnet create --mask="255.255.255.0" --name="wdqTAahO6i" --network="114.148.191.0"
    Message,Id,Name
    Subnet created,2,wdqTAahO6i
  1. LANG=en_US.UTF-8 hammer -v -u e6gnfe -p Vm59H6mWYc subnet info --id="2"
    Id: 2
    Name: wdqTAahO6i
    Network: 114.148.191.0
    Mask: 255.255.255.0
    Priority:
    DNS:
    Primary DNS:
    Secondary DNS:
    TFTP:
    DHCP:
    IPAM: DHCP
    VLAN ID:
    Gateway:
    From:
    To:
    Domains:
  1. LANG=en_US.UTF-8 hammer -v -u e6gnfe -p Vm59H6mWYc --output=csv domain create --name="AtgQExFsxL"
    Message,Id,Name
    Domain [AtgQExFsxL] created,3,AtgQExFsxL
  1. LANG=en_US.UTF-8 hammer -v -u e6gnfe -p Vm59H6mWYc domain info --id="3"
    Id: 3
    Name: AtgQExFsxL
    Description:
    DNS Id:
    Subnets:

Parameters:

Created at: 2016/04/11 20:04:57
Updated at: 2016/04/11 20:04:57

  1. LANG=en_US.UTF-8 hammer -v -u e6gnfe -p Vm59H6mWYc --output=csv hostgroup create --domain-id="3" --name="CGDI9YS04F" --subnet-id="2"
    Message,Id,Name
    Hostgroup created,6,CGDI9YS04F
  1. LANG=en_US.UTF-8 hammer -v -u e6gnfe -p Vm59H6mWYc hostgroup info --id="6"
    Id: 6
    Name: CGDI9YS04F
    Title: CGDI9YS04F
    Subnet: wdqTAahO6i
    Domain: AtgQExFsxL
    Puppet CA Proxy Id:
    Puppet Master Proxy Id:
    Puppetclasses:

Parameters:

Parent Id:

  1. LANG=en_US.UTF-8 hammer -v -u e6gnfe -p Vm59H6mWYc organization add-hostgroup --hostgroup-id="6" --id="144"
    Locations you cannot remove locations that are used by hosts or inherited.

Associated revisions

Revision ba5de89d (diff)
Added by Lukas Zapletal almost 3 years ago

Fixes #14583 - reworded orphan taxonomy validation error

History

#1 Updated by Dominic Cleal over 4 years ago

  • Category set to Organizations and Locations

Missing logs? You're describing a mismatch of some sort - add more info?

#2 Updated by Lukas Zapletal over 4 years ago

  • Subject changed from hammer organization add-hostgroup fails on an end to end scenario to Reword taxonomy orphans validation error

The validation error "cannot remove XYZ that are used by hosts or inherited" is reported when there are mismatches between objects.
To fix this, visit Mismatches report and find all related entities, then use the button to fix them all at once.

I can't find anything that shall be fixed in this case, it's misconfiguration at user side. I think the validation error message is misleading, it can appear when new Lifecycle Environment or a Hostgroup is being created. Therefore I suggest to reword it a bit to something like "Missing location" or "Expecting organization used by hosts or inherited".

#3 Updated by The Foreman Bot over 4 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Lukas Zapletal
  • Pull request https://github.com/theforeman/foreman/pull/3528 added

#4 Updated by Lukas Zapletal almost 3 years ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

#5 Updated by Marek Hulán almost 3 years ago

  • Legacy Backlogs Release (now unused) set to 296

Also available in: Atom PDF