-
Notifications
You must be signed in to change notification settings - Fork 239
Add OpenVox support #935
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
base: master
Are you sure you want to change the base?
Add OpenVox support #935
Conversation
This adds a fact that discovers if the Perforce or OpenVox agent is installed. If none are installed yet, we default to the Perforce package for backwards compatibility.
This is a resubmission of #933. I pasically added |
@@ -0,0 +1,10 @@ | |||
# frozen_string_literal: true | |||
|
|||
Facter.add('puppet_flavor') do |
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.
In voxpupuli/puppet_metadata#165 we started to use implementation
instead of favor
. But maybe favor
(or please flavour
) is better because it's shorter? Either way, I think we should be consistent.
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.
Any thoughts on enhancing openvox itself to provide an openvox_version
fact, just like there's puppet_version
? I imagine other software could also use it.
Going the structured route a puppet
fact could work:
{
"version": {
"full": "x.y.z",
"major": "x"
},
"implementation": "openvox",
}
vendor
might also be an option.
Feels like something for the language steering committee.
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 like this idea. I'll add it to the steering committee agenda
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.
Isn't facter responsible for providing facts? It does provide aio_agent_version
already, why not add variant
, vendor
, flavor
, implementation
or whatever you are going to call it as extra fact there. Changing how version is printed there would not be backwards compatible. Adding separate fact for puppet-agent could help.
When it is not coming from facter then we could assume it is "perforce puppet", but would be good if the steering committee could agree that both sides will add the fact in same format and with same name there.
puppet_metadata seems to be another binary that has to be called out by custom fact, which doesn't quite solve it for out of the box solution.
Oh and about the check foreman is using, then that is not consistent. It may not be enough to know which one is used. At least in case of RHEL7-9 and puppet/openvox v7.*
dnf info openvox-agent | head -n3
Installed Packages
Name : openvox-agent
Version : 7.36.1
dnf list installed | grep puppet
puppet7-release.noarch 7.0.0-20.el9 @puppet7 # that is only repo, not actual binary
puppet --help | tail -n1
Puppet v7.36.1
facter | grep version
aio_agent_version => 7.36.1
augeas => {
version => "1.14.1"
}
dmi => {
bios => {
version => "6.00"
},
}
facterversion => 4.2.8
kernelmajversion => 5.14
kernelversion => 5.14.0
os => {
selinux => {
policy_version => "33"
},
}
ruby => {
platform => "x86_64-linux",
sitedir => "/usr/local/share/ruby/site_ruby",
version => "3.0.7"
}
Cleaned up some output, but at least on v7 branch openvox agent doesn't report much differently from puppet agent.
4599b6e
to
76dc42e
Compare
76dc42e
to
b43a016
Compare
a7a6572
to
b207a35
Compare
ah yeah, we didn't backport that to 7.x. We probably should. Lemme chat with the team. |
EDIT: found it! So I just installed this module and it's active, and I applied the https://github.com/theforeman/puppet-puppet/pull/935.diff for this PR and now I can install openvox with: if $facts['networking']['hostname'] == 'labrat' {
class {
'puppet':
runmode => 'cron',
client_package => 'openvox-agent',
agent_server_hostname => 'theforeman.example.com',
}
} Although it doesn't set up the repo yet. |
I think it's also required that |
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.
Can we make it reflect that OpenVox introduced an implementation
fact?
Stdlib::Host $server = undef, | ||
Stdlib::Port $port = 8081, | ||
Boolean $soft_write_failure = false, | ||
String[1] $terminus_package = 'puppetdb-termini', |
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.
#936 is open for this same change and there I also suggested to make it Optional
String[1] $terminus_package = 'puppetdb-termini', | |
Optional[String[1]] $terminus_package = undef, |
@bastelfreak Any plans to continue this? (looks like there are conflicts as #936 was already merged) |
This adds a fact that discovers if the Perforce or OpenVox agent is installed. If none are installed yet, we default to the Perforce package for backwards compatibility.