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

Docs wrong for mcollective "deploy" command? #573

Closed
optiz0r opened this issue Dec 4, 2021 · 0 comments · Fixed by #574
Closed

Docs wrong for mcollective "deploy" command? #573

optiz0r opened this issue Dec 4, 2021 · 0 comments · Fixed by #574

Comments

@optiz0r
Copy link
Contributor

optiz0r commented Dec 4, 2021

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.25.1
  • Ruby: 2.7.3p183 system, 2.5.9p229 puppet
  • Distribution: AlmaLinux 8.5
  • Module version: master (b91a24f)

How to reproduce (e.g Puppet code you use)

Running the mcollective command as described in the readme to update the production environment

mco r10k deploy environment=production -C profile::puppet_server

What are you seeing

The environment is not updated

What behaviour did you expect instead

The environment to be updated to the latest commit in the git repository

Output log

[ben@whitefall puppet]$ mco r10k deploy environment production -C profile::puppet_server 

 * [ ============================================================> ] 1 / 1

whitefall.jellybean.sihnon.net:


Finished processing 1 / 1 hosts in 1951.61 ms

Any additional information you'd like to impart

I think the documentation is outdated,,or the mco application has been broken . The command does update the environment if I skip the environment argument on the commandline, e..g

mco r10k deploy production -C profile::puppet_server

The r10k mco application (https://github.com/voxpupuli/puppet-r10k/blob/master/files/mcollective/application/r10k.rb#L9) shifts the next arg off the argv stack when running in deploy mode, which is the literal keyword environment if the command is run per the README, rather than the actual environment name.

The mco application should perhaps shift twice if the first shift is the literal value environment so as to get the actual environment to be updated. Or the README could just be updated to omit the environment keyword.

optiz0r added a commit that referenced this issue Dec 4, 2021
The `mco r10k` application takes the next arg following the `deploy`
action as the environment name to be updated. The example command
in the README prefixes the environment name with the `environment`
keyword, which causes r10k to be invoked as

```bash
r10k deploy environment environment -p
```

instead of the expected environment name. Since the `environment`
environment likely does not exist, this renders the `mco r10k deploy`
command a noop.

Fixes #573
optiz0r added a commit that referenced this issue Dec 5, 2021
The `mco r10k` application takes the next arg following the `deploy`
action as the environment name to be updated. The example command
in the README prefixes the environment name with the `environment`
keyword, which causes r10k to be invoked as

```bash
r10k deploy environment environment -p
```

instead of the expected environment name. Since the `environment`
environment likely does not exist, this renders the `mco r10k deploy`
command a noop.

Fixes #573
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant