Bug 1536205
| Summary: | last rhcert breaks non interactive mode for rhcert-ci clean | ||
|---|---|---|---|
| Product: | Red Hat Certification Program | Reporter: | Gonéri Le Bouder <goneri> |
| Component: | redhat-certification | Assignee: | Zahid Ajaz <zajaz> |
| Status: | CLOSED NOTABUG | QA Contact: | rhcert qe <rhcert-qe> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 1.0 | CC: | brose, gnichols, goneri |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | --- | ||
| 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: | 2018-08-20 12:26:46 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: | |||
Better output:
Error Output:
Traceback (most recent call last):
File "/bin/rhcert-ci", line 28, in <module>
if not rhcert.do():
File "/usr/lib/python2.7/site-packages/rhcert/client/rhcertci.py", line 202, in do
result = self.commands[self.command]()
File "/usr/lib/python2.7/site-packages/rhcert/client/harness.py", line 1038, in doClean
deleteResult = self.ui.promptConfirm("Are you sure you want to delete all current test results?")
File "/usr/lib/python2.7/site-packages/rhcert/testUI.py", line 60, in promptConfirm
return self.ui.promptConfirm(message)
File "/usr/lib/python2.7/site-packages/rhcert/commandLineUI.py", line 97, in promptConfirm
answer = self.prompt(message)
File "/usr/lib/python2.7/site-packages/rhcert/commandLineUI.py", line 74, in prompt
response = raw_input(message)
EOFError: EOF when reading a line
Standard Output:
Are you sure you want to delete all current test results? (yes|no)
Are you running rhcert-ci clean [all]? yes. e.g:
[root@instack stack]# rhcert-ci clean all
Are you sure you want to delete all current test results? (yes|no) Traceback (most recent call last):
File "/bin/rhcert-ci", line 28, in <module>
if not rhcert.do():
File "/usr/lib/python2.7/site-packages/rhcert/client/rhcertci.py", line 202, in do
result = self.commands[self.command]()
File "/usr/lib/python2.7/site-packages/rhcert/client/harness.py", line 1038, in doClean
deleteResult = self.ui.promptConfirm("Are you sure you want to delete all current test results?")
File "/usr/lib/python2.7/site-packages/rhcert/testUI.py", line 60, in promptConfirm
return self.ui.promptConfirm(message)
File "/usr/lib/python2.7/site-packages/rhcert/commandLineUI.py", line 97, in promptConfirm
answer = self.prompt(message)
File "/usr/lib/python2.7/site-packages/rhcert/commandLineUI.py", line 74, in prompt
response = raw_input(message)
KeyboardInterrupt
Would a work-around such as: $ yes | rhcert-ci clean all help? In any case, we'll get it fixed in rhcert 5.7 which should ship around Feb 7. Thanks Greg. We just push the work around that you suggest: https://softwarefactory-project.io/r/#/c/10929/ 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-2018:0261 I've the problem again:
[root@undercloud stack]# rpm -qa|grep certification
redhat-certification-5.14-20180625.2.el7.noarch
redhat-certification-baremetal-5.14-20180625.2.el7.noarch
redhat-certification-backend-5.14-20180625.2.el7.noarch
redhat-certification-openstack-5.14-20180625.2.el7.noarch
[root@undercloud stack]# rhcert-cli clean all
Error: rhcert is already running (lock file /var/lock/subsys/rhcert found)
Override? (yes|no) Traceback (most recent call last):
File "/bin/rhcert-cli", line 30, in <module>
success = rhcertCLI.do()
File "/usr/lib/python2.7/site-packages/rhcert/client/rhcertcli.py", line 260, in do
if not self.getLock():
File "/usr/lib/python2.7/site-packages/rhcert/client/harness.py", line 1368, in getLock
if self.ui.promptConfirm("Override?"):
File "/usr/lib/python2.7/site-packages/rhcert/testUI.py", line 60, in promptConfirm
return self.ui.promptConfirm(message)
File "/usr/lib/python2.7/site-packages/rhcert/commandLineUI.py", line 97, in promptConfirm
answer = self.prompt(message)
File "/usr/lib/python2.7/site-packages/rhcert/commandLineUI.py", line 74, in prompt
response = raw_input(message)
KeyboardInterrupt
The correct backtrace:
[root@undercloud stack]# rhcert-cli clean all
Are you sure you want to delete all current test results? (yes|no) Traceback (most recent call last):
File "/bin/rhcert-cli", line 30, in <module>
success = rhcertCLI.do()
File "/usr/lib/python2.7/site-packages/rhcert/client/rhcertcli.py", line 286, in do
result = self.commands[self.command]()
File "/usr/lib/python2.7/site-packages/rhcert/client/harness.py", line 1074, in doClean
if bypassPrompt or self.ui.promptConfirm("Are you sure you want to delete all current test results?"):
File "/usr/lib/python2.7/site-packages/rhcert/testUI.py", line 60, in promptConfirm
return self.ui.promptConfirm(message)
File "/usr/lib/python2.7/site-packages/rhcert/commandLineUI.py", line 97, in promptConfirm
answer = self.prompt(message)
File "/usr/lib/python2.7/site-packages/rhcert/commandLineUI.py", line 74, in prompt
response = raw_input(message)
KeyboardInterrupt
We tried to reproduce the issue you are reportedly facing (using the version you have listed) but it is not reproducible. $ rpm -qa|grep certification redhat-certification-5.14-20180625.2.el7.noarch redhat-certification-openstack-5.14-20180625.2.el7.noarch redhat-certification-backend-5.14-20180625.2.el7.noarch redhat-certification-baremetal-5.14-20180625.2.el7.noarch $ rhcert-cli clean all Are you sure you want to delete all current test results? (yes|no) y Also remove certification data? (yes|no) y $ rhcert-cli clean Are you sure you want to delete all current test results? (yes|no) yes The commands worked correctly. Please provide additional information on reproducing the issue. The problem is the interactive prompt. We cannot use that in an Ansible playbook and Greg work around does not work anymore because we now have 2 interactions. The CI version of the command should work without a prompt for rhcert-5.7 and beyond:
> rhcert-ci clean all
Using ci version of 'clean' and 'clean all' commands worked fine. $ rhcert-ci clean all $ rhcert-cl clean |
Description of problem: We run rhcert in non-interactive mode but it raises this error: openstack-certification : Run certification test suite Error Output: Traceback (most recent call last): File "/bin/rhcert-ci", line 28, in <module> if not rhcert.do(): File "/usr/lib/python2.7/site-packages/rhcert/client/rhcertci.py", line 202, in do result = self.commands[self.command]() File "/usr/lib/python2.7/site-packages/rhcert/client/harness.py", line 1038, in doClean deleteResult = self.ui.promptConfirm("Are you sure you want to delete all current test results?") File "/usr/lib/python2.7/site-packages/rhcert/testUI.py", line 60, in promptConfirm return self.ui.promptConfirm(message) File "/usr/lib/python2.7/site-packages/rhcert/commandLineUI.py", line 97, in promptConfirm answer = self.prompt(message) File "/usr/lib/python2.7/site-packages/rhcert/commandLineUI.py", line 74, in prompt response = raw_input(message) EOFError: EOF when reading a line Standard Output: Are you sure you want to delete all current test results? (yes|no) Version-Release number of selected component (if applicable): redhat-certification-openstack-5.6-20180110.el7.noarch redhat-certification-backend-5.6-20180110.el7.noarch python-rhsm-certificates-1.19.10-1.el7_4.x86_64 redhat-certification-5.6-20180110.el7.noarch