I thought this bug would be a good opportunity for us to discuss this
behavior issue with my new PR
https://github.com/theforeman/foreman/pull/3451.
Scenario is very simple,
- You have a Hostgroup with 2 things filled like Arch + OS
- You go to new hosts page -> fill in name, puppet env, domain, network
info, os and arch. - You then select the host group.
What should be the ideal behaviour here? Foreman's present day behaviour is
"set what has not been set." So in my example applying the host group will
have no impact. IMO however the user selected that hostgroup because the
user wanted the changes in it applied. Especially in my case since it is a
new host I believe the changes in host group should be applied. That being
said I am a little confused on the ideal behaviour. So for example in the
above scenario I would not want the network information that I painfully
filled in that form to get wiped out while I would want the OS/ Media
information update.
So given this I can think of 3 approaches
- Keep status quo, fill what is not set
- Apply hostgroup fully
- Add facility to override certain properties on the host and not override
others. (I am thinking something in the host model to say
"overridable_attributes")
I am leaning towards 3 …
What are your takes on this?
Partha