Unable to assign hosts to a new location

Problem: I am trying to change the location of a host from the ‘Default Location’. I go into the All Host page, click the checkbox by the host I want to change, and select ‘Assign Location’ from the ‘Select Action’ drop down. From there, I select the location I want and tick the ‘fix location on mismatch’ radio box. Once hitting submit, I get the error message:

Unregister host before assigning an organization

Expected outcome: Host assigned to correct location

Foreman and Proxy versions: 2.1.1

Foreman and Proxy plugin versions:

Distribution and version: CentOS 7

Other relevant data:

Ultimately, I’m trying to get rid of the Default Location.

I am facing exactly same problem. In my case it happens only for content host. Hosts that are not registered in katello (is only in foreman part) work without problem and it is possible change their location.

Good to know its not just me with the issue.

I only have systems registered with katello, as that is the only part we are currently implementing.

This is indeed a bug. We’ve got a pull request open with a fix, and the issue for that is Bug #30702: Unable to change host location - Katello - Foreman

It’s targeted for inclusion in Katello 3.16.1 but I’m unsure of when we are aiming to release that - sooner than later I’d expect. In the mean time the only workaround I’m aware of is to change the location of each host individually from the UI or hammer in this way hammer host update --id=1 --new-location-id=3 which could be automated if you have a large number of hosts.

1 Like

Great, not me going crazy then. Will keep an eye on the bug then.

Thanks for the info.

1 Like