Bug 1949866 - The ccoctl fails to create authentication file when running the command `ccoctl aws create-identity-provider` with `--output-dir` parameter
Summary: The ccoctl fails to create authentication file when running the command `ccoc...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cloud Credential Operator
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.8.0
Assignee: Joel Diaz
QA Contact: wang lin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-15 09:33 UTC by wang lin
Modified: 2021-07-27 23:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-27 23:00:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cloud-credential-operator pull 327 0 None open Bug 1949866: use initialization structure for ID provider 2021-04-28 12:03:59 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:01:18 UTC

Description wang lin 2021-04-15 09:33:07 UTC
Description of problem:
When running the command `ccoctl aws create-identity-provider` with --output-dir parameter, it will show the below error

$ ./ccoctl aws create-identity-provider --name=lwan-tt-4 --region=us-east-1 --public-key-file ./test/serviceaccount-signer.public --output-dir test
2021/04/15 13:50:28 Bucket lwan-tt-4-oidc created
2021/04/15 13:50:29 OpenID Connect discovery document in the S3 bucket lwan-tt-4-oidc at .well-known/openid-configuration updated
2021/04/15 13:50:29 Reading public key
2021/04/15 13:50:29 JSON web key set (JWKS) in the S3 bucket lwan-tt-4-oidc at keys.json updated
2021/04/15 13:50:37 Identity Provider created with ARN: arn:aws:iam::301721915996:oidc-provider/lwan-tt-4-oidc.s3.us-east-1.amazonaws.com
2021/04/15 13:50:37 failed to save cluster authentication file: open test/manifests/cluster-authentication-02-config.yaml: no such file or directory

Root cause:
https://github.com/openshift/cloud-credential-operator/blob/master/pkg/cmd/provisioning/aws/create_identity_provider.go#L486-L495
For func initEnvForCreateIdentityProviderCmd() , it doesn’t have a structure named CreateAllOpts, should be structure CreateIdentityProviderOpts.

Version-Release number of selected component (if applicable):
4.8.0-0.nightly-2021-04-15-030836

How reproducible:
always

Steps to Reproduce: 
1. Run the command `ccoctl aws create-identity-provider` with “--output-dir” parameter

Actual results:
Fail to save cluster authentication file

Expected results:
It can create cluster authentication file

Additional info:

Comment 3 wang lin 2021-04-30 03:55:04 UTC
The issue has fixed on 4.8.0-0.nightly-2021-04-29-222100.


Running `create-identity-provider` and `create-iam-roles` subcommand with “--output-dir” parameter can write files to output dir.

Comment 6 errata-xmlrpc 2021-07-27 23:00:57 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.8.2 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.

https://access.redhat.com/errata/RHSA-2021:2438


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