Bug 1290290

Summary: [GSS](6.4.z) patch apply command not working as expected in non-interactive mode in domain mode
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Abhijit humbe <abhumbe>
Component: CLIAssignee: Enrique Gonzalez Martinez <egonzale>
Status: CLOSED CURRENTRELEASE QA Contact: Peter Mackay <pmackay>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4.4CC: bmaxwell, brian.stansberry, cdewolf, egonzale, istudens, jboss-set, jtruhlar, msimka, msochure, pmackay
Target Milestone: CR1   
Target Release: EAP 6.4.11   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-17 13:12:57 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:
Bug Depends On:    
Bug Blocks: 1361648    
Attachments:
Description Flags
CLI debug logging none

Description Abhijit humbe 2015-12-10 05:10:36 UTC
Created attachment 1104209 [details]
CLI debug logging

Description of problem:
Not able to apply patch(EAP 6.4.0-->EAP 6.4.4) to remote host controller using CLI command in non-interactive mode, it fails with exception.
~~~
[abhumbe@abhumbe bin]$ ./jboss-cli.sh --controller=10.10.10.10 --command="patch apply --host=slave /JBoss-EAP/EAP6.x.x/jboss-eap-6.4.4-patch.zip"
patching exception
~~~
Similarly we are able to patch domain controller but not to the remote host controller.


How reproducible:
Domain controller with remote host controller.

Steps to Reproduce:
1. start EAP 6.4 server in domain mode and connect with remote host controller.
2. Try to upgrade domain controller and remote host controller to 6.4.4 using patch apply command in non-interactive mode.
3. For domain controller its successful but not for remote host controller. 

Actual results:
Not able to apply patch to remote host controller using CLI in non-interactive mode.

Expected results:
We should be able to patch remote host controller using CLI in non-interactive mode.

Additional info:
On first attempt outcome of the command is 'success', but patch is not applied to remote host controller.
============
[abhumbe@abhumbe bin]$ ./jboss-cli.sh --controller=10.10.10.10 --command="patch apply --host=slave /JBoss-EAP/EAP6.x.x/jboss-eap-6.4.4-patch.zip"
{
    "outcome" : "success",
    "result" : {}
}
 
[domain.10.10:9999 /] patch info --host=slave
{
    "outcome" : "success",
    "result" : {
        "cumulative-patch-id" : "base",
        "patches" : [],
        "version" : "6.4.0.GA",
        "addon" : null,
        "layer" : {"base" : {
            "cumulative-patch-id" : "base",
            "patches" : []
        }}
    }
}
============
On further attempt it fails with "patching exception". On enabled DEBUG logging for CLI, I cant see any exception in log file. Debug log file attached.

Comment 1 Enrique Gonzalez Martinez 2016-01-15 15:14:58 UTC
The workaround is to specify the option -c to enforce the connection to the server. This works for me:

./jboss-cli.sh -c --controller=10.10.10.10 --command="patch apply --host=slave /JBoss-EAP/EAP6.x.x/jboss-eap-6.4.4-patch.zip"

This applies properly the patch. I'm still investigating why jboss-cli is bypassing the option --host if the option -c is not specified.

Comment 2 Enrique Gonzalez Martinez 2016-01-25 09:37:42 UTC
the problem is that CLI is allowing the --host option to be specified in offline mode. I proposed a fix to avoid this misleading situation:

6.4.z: https://github.com/jbossas/jboss-eap/pull/2694
7.0.0: https://github.com/jbossas/wildfly-core-eap/pull/141

Comment 3 Mike McCune 2016-03-28 22:33:16 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 4 JBoss JIRA Server 2016-06-14 11:37:13 UTC
Jiri Pallich <jpallich> updated the status of jira JBEAP-2997 to Closed

Comment 5 Peter Mackay 2016-10-04 12:07:09 UTC
Verified with EAP 6.4.11.CP.CR1. The --host option is no longer available in offline mode.

Comment 6 Petr Penicka 2017-01-17 13:12:57 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.