treydock / puppet-module-globus

Other
0 stars 7 forks source link

Fix execution condition of Exec['globus-node-setup'] #29

Closed cmd-ntrf closed 2 years ago

cmd-ntrf commented 2 years ago

Execution of the command globus-node-setup is currently expected to create the file /var/lib/globus-connect-server/info.json. However, since at least globus-connect-server54 version 5.4.39, the file is actually created by the preceding command Exec['globus-endpoint-setup'], but the file is left empty for globus-node-setup to fill.

This PR replaces the original condition

creates => '/var/lib/globus-connect-server/info.json'

by the following condition that tests that the file exists and is not empty.

unless => 'test -s /var/lib/globus-connect-server/info.json'

This guarantees the execution of globus-node-setup regardless of which command creates the file /var/lib/globus-connect-server/info.json in preceding, current and future version of globus-connect-server.

treydock commented 2 years ago

Unit tests will likely fail on this:

https://github.com/treydock/puppet-module-globus/blob/d996ef5df7fde09cb7c0a259b2d41b902d94cca3/spec/shared_examples/globus_config.rb#L63

That might be only update needed to get tests to pass. CentOS 8 tests will fail, something I can fix later.

cmd-ntrf commented 2 years ago

I have updated globus_config.rb to reflect the change.

treydock commented 2 years ago

The acceptance test failures are something broken with Globus CLI, I've opened a case with Globus. The acceptance tests don't test the code path changed in this pull request, so looks good.

treydock commented 2 years ago

This is released as v6.0.1