Bug 2062310 - MCC bootstrap command lacks template flag
Summary: MCC bootstrap command lacks template flag
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Machine Config Operator
Version: 4.11
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.9.z
Assignee: Dan Mace
QA Contact: Rio Liu
: 2062311 (view as bug list)
Depends On: 2062290
Blocks: 2062312
TreeView+ depends on / blocked
Reported: 2022-03-09 14:25 UTC by Dan Mace
Modified: 2022-04-20 14:50 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2062290
: 2062312 (view as bug list)
Last Closed: 2022-04-20 14:49:50 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift machine-config-operator pull 2998 0 None open [release-4.9] Bug 2062310: Add --templates flag to MCC bootstrap command 2022-04-06 17:11:07 UTC
Red Hat Product Errata RHSA-2022:1363 0 None None None 2022-04-20 14:50:24 UTC

Description Dan Mace 2022-03-09 14:25:17 UTC
+++ This bug was initially created as a clone of Bug #2062290 +++

+++ This bug was initially created as a clone of Bug #2062007 +++

Description of problem:

The `machine-config-controller bootstrap` subcommand uses the `--template` flag default value, but the flag is only associated with the `start` subcommand internally, so end users can't actually override the hard-coded default value when running the `bootstrap` command.

Version-Release number of MCO (Machine Config Operator) (if applicable):

Platform (AWS, VSphere, Metal, etc.): All

Are you certain that the root cause of the issue being reported is the MCO (Machine Config Operator)?
(Y/N/Not sure): Y

How reproducible:

Run `machine-config-controller bootstrap --template`.

Did you catch this issue by running a Jenkins job? If yes, please list: No

Steps to Reproduce:

Run `machine-config-controller bootstrap --template ...`.

Actual results:

Command fails because the `--template` flag is unrecognized.

Expected results:

Should work with the value I provided.

Additional info:

This was encountered performing integration work for HyperShift.

Comment 1 Kirsten Garrison 2022-03-12 00:13:36 UTC
*** Bug 2062311 has been marked as a duplicate of this bug. ***

Comment 3 Sergio 2022-04-08 12:30:57 UTC
Verified using:
$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.9.0-0.nightly-2022-04-08-094600   True        False         10m     Cluster version is 4.9.0-0.nightly-2022-04-08-094600


$ oc project openshift-machine-config-operator 
Already on project "openshift-machine-config-operator" on server "https://api.sregidor-test12.qe.devcluster.openshift.com:6443".
$ oc get pods
NAME                                         READY   STATUS    RESTARTS      AGE
machine-config-controller-5858b8d7b9-76zrc   1/1     Running   1 (18m ago)   22m
machine-config-daemon-2tfpg                  2/2     Running   0             24m
machine-config-daemon-5fphc                  2/2     Running   0             24m
machine-config-daemon-9cxwd                  2/2     Running   0             14m
machine-config-daemon-dsb5p                  2/2     Running   0             16m
machine-config-daemon-n95fc                  2/2     Running   0             24m
machine-config-operator-75d8c4c9cc-l6crc     1/1     Running   1 (18m ago)   25m
machine-config-server-8pd2b                  1/1     Running   0             22m
machine-config-server-k6rgs                  1/1     Running   0             22m
machine-config-server-mjlrl                  1/1     Running   0             22m

$ oc rsh machine-config-controller-5858b8d7b9-76zrc
sh-4.4# machine-config-controller --help
Run Machine Config Controller

  machine-config-controller [command]

Available Commands:
  bootstrap   Starts Machine Config Controller in bootstrap mode
  help        Help about any command
  start       Starts Machine Config Controller
  version     Print the version number of Machine Config Controller

      --alsologtostderr                  log to standard error as well as files
  -h, --help                             help for machine-config-controller
      --log_backtrace_at traceLocation   when logging hits line file:N, emit a stack trace (default :0)
      --log_dir string                   If non-empty, write log files in this directory
      --logtostderr                      log to standard error instead of files
      --stderrthreshold severity         logs at or above this threshold go to stderr (default 2)
      --templates string                 Path to the template files used for creating MachineConfig objects (default "/etc/mcc/templates")   <-- the "--templates" flag is present now
  -v, --v Level                          log level for V logs
      --vmodule moduleSpec               comma-separated list of pattern=N settings for file-filtered logging

Use "machine-config-controller [command] --help" for more information about a command.

sh-4.4# machine-config-controller bootstrap --templates            
Error: flag needs an argument: --templates

Moved to VERIFIED status.

Comment 8 errata-xmlrpc 2022-04-20 14:49:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.9.29 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.