Bug 1748058

Summary: [CPMA]local model not configure hostname's value
Product: OpenShift Container Platform Reporter: Xin jiang <xjiang>
Component: Migration ToolingAssignee: Gilles Dubreuil <gdubreui>
Status: CLOSED ERRATA QA Contact: Xin jiang <xjiang>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2.0CC: ademicev, chezhang, jmatthew, sregidor, xjiang
Target Milestone: ---   
Target Release: 4.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-30 04:44:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Xin jiang 2019-09-02 15:18:40 UTC
Description of problem:

While executing cpma utility, it missed to config hostname's value, which caused that it's unable to find config files

Version-Release number of selected component (if applicable):
OCP 3.7
commit id: bbf1f97aaf646f94691c46ee520c823520bb73c1


How reproducible:
always

Steps to Reproduce:
1. execute cpma utility with local model

Actual results:
1. It doesn't ask customer to input hostname's value
$ ./bin/cpma
? Do you wish to save configuration for future use? true
? What will be the source for OCP3 config files? Local
? Path to crio config file /etc/crio/crio.conf
? Path to etcd config file /etc/etcd/etcd.conf
? Path to master config file /etc/origin/master/master-config.yaml
? Path to node config file /etc/origin/node/node-config.yaml
? Path to registries config file /etc/containers/registries.conf
? What will be the source for cluster name used to connect to API? Select kubeconfig context
? Select cluster obtained from KUBECONFIG contexts ci-vm-10-0-151-250-hosted-upshift-rdu2-redhat-com:8443
? Path to application data, skip to use current directory data
INFO[02 Sep 19 22:23 CST] Starting manifest and report generation
INFO[02 Sep 19 22:23 CST] Transform:Starting for - API
INFO[02 Sep 19 22:23 CST] APITransform::Extract
WARN[02 Sep 19 22:23 CST] Skipping API: open data/etc/origin/master/master-config.yaml: no such file or directory
INFO[02 Sep 19 22:23 CST] Transform:Starting for - Cluster
....

2. checked the generated cpma.yaml, it missed hostname's value
$ cat ~/cpma.yaml
clustername: ci-vm-10-0-151-250-hosted-upshift-rdu2-redhat-com:8443
configsource: local
crioconfigfile: /etc/crio/crio.conf
debug: false
etcdconfigfile: /etc/etcd/etcd.conf
fetchfromremote: false
home: /Users/xinjiang
hostname: ""
insecurehostkey: false

Expected results:
it should config hostname's value in cpma.yaml.

Additional info:

Comment 1 Gilles Dubreuil 2019-09-05 12:58:44 UTC
I confirm the issue, thanks for reporting it.

Comment 2 Gilles Dubreuil 2019-09-05 13:45:19 UTC
This issue has been addressed with upstream patch https://github.com/fusor/cpma/pull/385.

Comment 3 Gilles Dubreuil 2019-09-20 15:50:17 UTC
Backported to release-1.0 and available in latest corresponding build.

Comment 4 Xin jiang 2019-09-23 03:18:16 UTC
Verified and it works well.
Git commit id: 
commit 006c5698376dda59438d6b25e78f00ad1dd630a4 (HEAD -> release-1.0, origin/release-1.0)

Comment 6 errata-xmlrpc 2019-10-30 04:44:54 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, 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/RHBA-2019:3151