-
Notifications
You must be signed in to change notification settings - Fork 130
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
Drop dynflow_core support #720
Conversation
file { '/etc/smart_proxy_dynflow_core/settings.yml': | ||
ensure => file, | ||
content => template('foreman_proxy/plugin/dynflow_core.yml.erb'), | ||
require => Foreman_proxy::Plugin['dynflow_core'], | ||
notify => Service[$service], | ||
} | ||
|
||
file { '/etc/smart_proxy_dynflow_core/settings.d': | ||
ensure => link, | ||
target => "${foreman_proxy::config_dir}/settings.d", | ||
require => Foreman_proxy::Plugin['dynflow_core'], | ||
notify => Service[$service], | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of removing the code, we could also ensure → absent for a cleanup, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleanup sounds reasonable to me. Otoh would we still want to eventually drop it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this normally owned by a package? If so, can we ensure the package is absent instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
settings.yml
was owned by the package (see https://github.com/theforeman/foreman-packaging/pull/6753/files), but settings.d
not, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the other hand, it's probably marked as a config file so it would stay as .rpmsave
so cleaning it up is likely needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hah, I thought about that at lunch, but then forgot again when I started typing the commit update…
service { 'smart_proxy_dynflow_core': | ||
ensure => $external_core, | ||
enable => $external_core, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of removing the code, we could also ensure → absent for a cleanup, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The service is owned by the package that should be removed, right? Removing the package is the best way to get rid of the service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least in the last version of the package I have here:
# rpm -ql rubygem-smart_proxy_dynflow_core
/usr/share/gems/gems/smart_proxy_dynflow_core-0.4.1
/usr/share/gems/gems/smart_proxy_dynflow_core-0.4.1/Gemfile.in
/usr/share/gems/gems/smart_proxy_dynflow_core-0.4.1/LICENSE
/usr/share/gems/gems/smart_proxy_dynflow_core-0.4.1/lib
/usr/share/gems/gems/smart_proxy_dynflow_core-0.4.1/lib/smart_proxy_dynflow_core
/usr/share/gems/gems/smart_proxy_dynflow_core-0.4.1/lib/smart_proxy_dynflow_core.rb
/usr/share/gems/gems/smart_proxy_dynflow_core-0.4.1/lib/smart_proxy_dynflow_core/task_launcher_registry.rb
/usr/share/gems/gems/smart_proxy_dynflow_core-0.4.1/lib/smart_proxy_dynflow_core/version.rb
/usr/share/gems/gems/smart_proxy_dynflow_core-0.4.1/smart_proxy_dynflow_core.gemspec
/usr/share/gems/specifications/smart_proxy_dynflow_core-0.4.1.gemspec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.4.1 was already an compatibility-only shim mapping constants to dfifferent names. From a version we shipped in 2.4:
# rpm -ql ./tfm-rubygem-smart_proxy_dynflow_core-0.3.3-1.fm2_4.el7.noarch.rpm
/etc/logrotate.d/tfm-rubygem-smart_proxy_dynflow_core
/etc/smart_proxy_dynflow_core/settings.yml
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/Gemfile.in
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/LICENSE
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/bin
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/bin/smart_proxy_dynflow_core
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/config
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/config/settings.yml.example
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/lib
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/lib/smart_proxy_dynflow_core
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/lib/smart_proxy_dynflow_core.rb
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/lib/smart_proxy_dynflow_core/api.rb
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/lib/smart_proxy_dynflow_core/bundler_helper.rb
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/lib/smart_proxy_dynflow_core/callback.rb
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/lib/smart_proxy_dynflow_core/core.rb
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/lib/smart_proxy_dynflow_core/helpers.rb
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/lib/smart_proxy_dynflow_core/launcher.rb
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/lib/smart_proxy_dynflow_core/log.rb
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/lib/smart_proxy_dynflow_core/logger_middleware.rb
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/lib/smart_proxy_dynflow_core/middleware
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/lib/smart_proxy_dynflow_core/middleware/keep_current_request_id.rb
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/lib/smart_proxy_dynflow_core/request_id_middleware.rb
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/lib/smart_proxy_dynflow_core/settings.rb
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/lib/smart_proxy_dynflow_core/task_launcher_registry.rb
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/lib/smart_proxy_dynflow_core/testing.rb
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/lib/smart_proxy_dynflow_core/version.rb
/opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.3.3/smart_proxy_dynflow_core.gemspec
/opt/theforeman/tfm/root/usr/share/gems/specifications/smart_proxy_dynflow_core-0.3.3.gemspec
/opt/theforeman/tfm/root/usr/share/smart_proxy_dynflow_core/bundler.d
/usr/bin/smart_proxy_dynflow_core
/usr/lib/systemd/system/smart_proxy_dynflow_core.service
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but it did own that file before, so it's probably cleaned up on removal/upgrade, you're right
https://github.com/theforeman/foreman-packaging/pull/6753/files
160f3b8
to
1b9e75b
Compare
@adamruzicka @ekohl seems we forgot something while dropping _core ;) |
13f27a8
to
2e3c7bb
Compare
this is as green as it gets without me getting really dirty with psych. |
# Require a valid cert to access Dynflow console | ||
:console_auth: <%= scope.lookupvar('::foreman_proxy::plugin::dynflow::console_auth') %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a regression that you're fixing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, it was in core yml before.
or do you mean in a non-external-core scenario? heck, I don't know? ;)
I was following the lines of theforeman/smart_proxy_dynflow@e205e19#diff-8a58542e75188035fcfefaf9049586f5665b71ae0dabe5f533a61d3719f00e78
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or do you mean in a non-external-core scenario? heck, I don't know? ;)
Indeed. It looks like that wasn't implemented. However, it defaults to true in the plugin itself and is only used to disable authentication. Not really important to cherry pick then.
clean up should be as simple as file { '/etc/smart_proxy_dynflow_core/settings.d':
ensure => absent
} ->
foreman_proxy::plugin { 'dynflow_core':
version => 'absent',
} right? |
That looks good. The chaining is indeed a good idea because it probably means that |
That was indeed the intention |
8933f88
to
32055ea
Compare
it's gone since smart_proxy_dynflow 0.4.0
32055ea
to
03495d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to rebase on master since I just merged the pin-rdoc branch. Otherwise 👍
git is smart enough, and you thankfully used the exact diff I had in my commit ;) |
it's gone since smart_proxy_dynflow 0.4.0