Bug 1409561 - During --abort operation, "--log-file LOG_FILE" doesn't capture all outputs to the log file
Summary: During --abort operation, "--log-file LOG_FILE" doesn't capture all outputs t...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: cns-deploy-tool
Version: cns-3.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: CNS 3.5
Assignee: Michael Adam
QA Contact: Prasanth
URL:
Whiteboard:
Depends On:
Blocks: 1415598
TreeView+ depends on / blocked
 
Reported: 2017-01-02 13:28 UTC by Prasanth
Modified: 2018-12-06 20:00 UTC (History)
8 users (show)

Fixed In Version: cns-deploy-4.0.0-11.el7rhgs
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-20 18:26:29 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1112 normal SHIPPED_LIVE cns-deploy-tool bug fix and enhancement update 2017-04-20 22:25:47 UTC

Description Prasanth 2017-01-02 13:28:39 UTC
Description of problem:

During --abort operation, "--log-file LOG_FILE" doesn't capture all of it's outputs to the log file. See below:

##############
# cns-deploy -g --abort --log-file=/var/log/latest-cns-deploy-abort-2.log
Multiple CLI options detected. Please select a deployment option.
[O]penShift, [K]ubernetes? [O/o/K/k]: o
Using OpenShift CLI.
Using namespace "storage-project".
Do you wish to proceed with aborting the deployment
[Y]es, [N]o? [Default: N]: y
No resources found
No resources found
service "heketi-storage-endpoints" deleted
serviceaccount "heketi-service-account" deleted
template "deploy-heketi" deleted
template "heketi" deleted
node "dhcp46-234.lab.eng.blr.redhat.com" labeled
node "dhcp47-54.lab.eng.blr.redhat.com" labeled
node "dhcp47-178.lab.eng.blr.redhat.com" labeled
deploymentconfig "heketi" deleted
route "heketi" deleted
service "heketi" deleted
pod "heketi-1-x0vha" deleted
daemonset "glusterfs" deleted
template "glusterfs" deleted


# cat /var/log/latest-cns-deploy-abort-2.log
Multiple CLI options detected. Please select a deployment option.
Using OpenShift CLI.
Using namespace "storage-project".
##############

Version-Release number of selected component (if applicable):
cns-deploy-3.1.0-11.el7rhgs.x86_64
openshift v3.4.0.38
kubernetes v1.4.0+776c994

How reproducible: Always


Steps to Reproduce:
1. Install cns-deploy-3.1.0-11.el7rhgs.x86_64
2. Create a new namespace called "storage-project"
3. Setup a router as described in our official doc
4. Create a topology file
5. Deploy cns using the cns-deploy tool
6. Execute # cns-deploy -g --abort --log-file=/var/log/latest-cns-deploy-abort-2.log


Actual results: It doesn't capture any useful info into the log file and thus making debugging difficult.


Expected results: It should capture ALL the commands executed and it's possible outputs so as it helps in future debugging


Additional info:

Comment 1 Mohamed Ashiq 2017-01-02 15:31:46 UTC
We need to capture output for all the commands in the cns-deploy and let output function print it, so everything will be logged. This change will require more time.

Comment 2 Humble Chirammal 2017-01-03 06:57:59 UTC
Proposing this for CNS 3.5 and removing it from the tracker.

Comment 5 Prasanth 2017-03-30 11:34:40 UTC
Tested this against the latest cns-deploy build and looks like the issue persists. See below:

###################
[root@dhcp46-195 opt]# cns-deploy -g --abort --log-file=/var/log/cns-deploy/latest-cns-deploy-abort-5.log
Using OpenShift CLI.
NAME              STATUS    AGE
storage-project   Active    2d
Using namespace "storage-project".
Do you wish to abort the deployment?
[Y]es, [N]o? [Default: N]: y
service "heketi" deleted
serviceaccount "heketi-service-account" deleted
No resources found
service "heketi-storage-endpoints" deleted
deploymentconfig "heketi" deleted
route "heketi" deleted
template "deploy-heketi" deleted
template "heketi" deleted
Error from server (NotFound): secrets "heketi-db-backup" not found
node "dhcp46-53.lab.eng.blr.redhat.com" labeled
node "dhcp47-145.lab.eng.blr.redhat.com" labeled
node "dhcp47-131.lab.eng.blr.redhat.com" labeled
daemonset "glusterfs" deleted
template "glusterfs" deleted


[root@dhcp46-195 cns-deploy]# ls -al /var/log/cns-deploy/latest-cns-deploy-abort-5.log
-rw-r--r--. 1 root root 56 Mar 30 16:53 /var/log/cns-deploy/latest-cns-deploy-abort-5.log


[root@dhcp46-195 cns-deploy]# cat /var/log/cns-deploy/latest-cns-deploy-abort-5.log
Using OpenShift CLI.
Using namespace "storage-project".
###################

Moving this bz back to Assigned for fixing the same.

Comment 7 Michael Adam 2017-03-30 15:54:37 UTC
https://github.com/gluster/gluster-kubernetes/pull/221

has been merged upstream. will get into next build.

Comment 9 Prasanth 2017-04-04 08:12:01 UTC
Verified

Comment 11 errata-xmlrpc 2017-04-20 18:26:29 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/RHEA-2017:1112

Comment 12 vinutha 2018-12-06 20:00:43 UTC
Marking qe-test-coverage as - since the preferred mode of deployment is using ansible


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