Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug #2231: Hostgroup deletion follows adopt policy #419

Closed

Conversation

dLobatog
Copy link
Member

Given a hostgroup hierarchy like:

/base
/base/test01
/base/test01/test02
/base/test01/test03

Currently, if /base/test01 is deleted, it leads to a clunky configuration

/base
/test02
/test03

This change makes a hostgroup adopt orphans so that removing test01 would lead to:

/base
/base/test02
/base/test03

http://projects.theforeman.org/issues/2231

@ohadlevy
Copy link
Member

which version of the ancestry gem is required? it does not work on my local 1.3 version

gems/ancestry-1.3.0/lib/ancestry/class_methods.rb:26:in `orphan_strategy=': Invalid orphan strategy,
 valid ones are :rootify, :restrict and :destroy. (Ancestry::AncestryException)

@dLobatog
Copy link
Member Author

That caused some problems in here as well, if you check the README for the gem you have installed is not actually 1.3.0 but something older, I thought it was our problem but apparently the only way to get around it is to get the gem from the repo itself not Rubygems.

gem "ancestry", :git => "git://github.com/stefankroes/ancestry.git" on the Gemfile should do it

@ohadlevy
Copy link
Member

I see...then we should wait for a new release of the gem... Maybe we could
ping the author to release a new version?

@ohadlevy
Copy link
Member

[test]

@theforeman-bot
Copy link
Member

Test Results: FAILURE (http://ci.theforeman.org/job/test_develop_pull_request/42/)

@theforeman-bot
Copy link
Member

Evaluated up to 8215371

@ohadlevy
Copy link
Member

closing for now, as the gem is not released, see stefankroes/ancestry#123.

once ready, I'll be more than happy to merge

@ohadlevy ohadlevy closed this Apr 10, 2013
LiorKGOW pushed a commit to LiorKGOW/foreman that referenced this pull request Oct 20, 2022
This also fixes some unrelated test failures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants