Bug 991469
| Summary: | The CLI command "module remove" fails to delete non-empty folders | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Josef Cacek <jcacek> |
| Component: | CLI | Assignee: | Ivo Studensky <istudens> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Petr Kremensky <pkremens> |
| Severity: | medium | Docs Contact: | Russell Dickenson <rdickens> |
| Priority: | unspecified | ||
| Version: | 6.1.0, 6.1.1 | CC: | istudens, myarboro, olukas |
| Target Milestone: | ER1 | ||
| Target Release: | EAP 6.2.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-12-15 16:19:13 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
Josef Cacek
2013-08-02 13:27:40 UTC
Verified on EAP 6.2.0.ER3 Stan Silvert <ssilvert> updated the status of jira WFLY-1913 to Reopened Stan Silvert <ssilvert> made a comment on jira WFLY-1913 Reopening. This fix breaks module commands that are part of a deployment archive. See erroneous fix here: https://github.com/wildfly/wildfly/commit/e4c831dfe87668dd3a1c308ae43378e015e416b4#diff-f8a04572ea92d965c2b95278f93cdd90 You can't just get rid of the call to ctx.getCurrentDir(). It's there for a reason. A module command can be included in a deploy.scr script, which is inside a *.cli archive. See https://community.jboss.org/wiki/CLIDeploymentArchive The call to ctx.getCurrenDir() ensures that the resources are found in the archive rather than on the file system. Ivo Studensky <istudens> made a comment on jira WFLY-1913 I've got rid of it since the ctx.getCurrentDir() is called before that line, within translatePath() call at line 151 unless the path starts with root, see [1]. Thanks for the counter example I will take a look at it. [1] https://github.com/wildfly/wildfly/blob/master/cli/src/main/java/org/jboss/as/cli/handlers/module/ASModuleHandler.java#L151 Stan Silvert <ssilvert> made a comment on jira WFLY-1913 I've attached a *.cli archive that demonstrates the problem. Ivo Studensky <istudens> made a comment on jira WFLY-1913 I've hacked up a simple test case for the CLI deployment archive involving a simple war which works as expected. I will continue on this and test it with the archive you attached. https://github.com/istudens/wildfly/commit/411d60fa299484db688ccde747a04bc19107b70a Ivo Studensky <istudens> made a comment on jira WFLY-1913 Ah, nevermind. It needs a module add command included in the deploy.scr script. I will enhance the test case accordingly and fix the issue. Ivo Studensky <istudens> made a comment on jira WFLY-1913 Ah, nevermind, too many context switches on my side. It needs a module add command included in the deploy.scr script. I will enhance the test case accordingly and fix the issue. Ivo Studensky <istudens> made a comment on jira WFLY-1913 Created a new PR which fixes the regression and adds a test-case for it. Ivo Studensky <istudens> made a comment on jira WFLY-1913 Merged. |