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

Drop dynflow_core support #720

Merged
merged 2 commits into from
Jan 6, 2022
Merged

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Jan 5, 2022

it's gone since smart_proxy_dynflow 0.4.0

Comment on lines -54 to -66
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],
}
Copy link
Member Author

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?

Copy link
Contributor

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?

Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

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…

Comment on lines -84 to -87
service { 'smart_proxy_dynflow_core':
ensure => $external_core,
enable => $external_core,
}
Copy link
Member Author

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?

Copy link
Member

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.

Copy link
Member Author

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

Copy link
Contributor

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

Copy link
Member Author

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

@evgeni
Copy link
Member Author

evgeni commented Jan 5, 2022

@adamruzicka @ekohl seems we forgot something while dropping _core ;)

@evgeni
Copy link
Member Author

evgeni commented Jan 5, 2022

this is as green as it gets without me getting really dirty with psych.

Comment on lines +5 to +6
# Require a valid cert to access Dynflow console
:console_auth: <%= scope.lookupvar('::foreman_proxy::plugin::dynflow::console_auth') %>
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member

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.

@evgeni
Copy link
Member Author

evgeni commented Jan 6, 2022

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?

@ekohl
Copy link
Member

ekohl commented Jan 6, 2022

clean up should be as simple as

That looks good. The chaining is indeed a good idea because it probably means that /etc/smart_proxy_dynflow_core ends up being removed as well.

@evgeni
Copy link
Member Author

evgeni commented Jan 6, 2022

clean up should be as simple as

That looks good. The chaining is indeed a good idea because it probably means that /etc/smart_proxy_dynflow_core ends up being removed as well.

That was indeed the intention

@evgeni evgeni force-pushed the drop-dynflow-core branch 3 times, most recently from 8933f88 to 32055ea Compare January 6, 2022 13:18
Copy link
Member

@ekohl ekohl left a 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 👍

@evgeni evgeni merged commit 7c27c94 into theforeman:master Jan 6, 2022
@evgeni evgeni deleted the drop-dynflow-core branch January 6, 2022 13:43
@evgeni
Copy link
Member Author

evgeni commented Jan 6, 2022

I think you need to rebase on master since I just merged the pin-rdoc branch. Otherwise +1

git is smart enough, and you thankfully used the exact diff I had in my commit ;)

@ekohl ekohl changed the title drop dynflow_core support Drop dynflow_core support Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants