Bug 1123201 - Write access on application home directory.
Summary: Write access on application home directory.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-25 06:27 UTC by Kaya Niranjan Kumar Reddy
Modified: 2015-05-14 23:37 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-25 15:58:24 UTC


Attachments (Terms of Use)

Description Kaya Niranjan Kumar Reddy 2014-07-25 06:27:23 UTC
Description of problem:
how to create directory ".kony" in the application's home directory (e.g., /var/lib/openshift/53d0bd76500446b01c000214/.kony/). Need to do it as my app needs access to this location to validate license. And I can't alter the location by any means. I figured that out. But unless I create the directory at the location, openshift will be just useless for my implementation. Will openshift support ticket help me? I mean, if I raise a ticket with support will they create the directory for me? (I am using free version of openshift)

Version-Release number of selected component (if applicable):


How reproducible:
create any directory in the application home directory.

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Please enable this feature. If not possible then please create this directory ".kony" and give write permission to this newly created directory.

Comment 1 Jhon Honce 2014-07-25 15:58:24 UTC
Currently the home directory is locked to ensure directory layout is as the system expects. A specialized downloadable cartridge could create that directory in the cartridge's install script. You could base your customization off which ever framework cartridge you are currently using.

In OpenShift, all files/directories must be 'owned' by a cartridge so they are cleaned up when the cartridge is removed.

Comment 2 Manuel Blechschmidt 2014-10-20 10:49:20 UTC
Hi,
I had today the same problem with my Java Enterprise application.

I do the following:

        private static File getIndexDir() {
		String userHome = System.getProperty("user.home");
		File dir = new File(userHome + "/.logAnalyzer");
		if (!dir.exists()) {
			dir.mkdir();
		}
		return dir;
	}

I would definitely consider this a bug.

Here is the log from my wildfly instance:

cd /var/lib/openshift/542acde55004462dc4000549/wildfly/logs
tail server.log

2014-10-20 06:48:05,872 WARNING [de.mobizcorp.log.demandware_analyzer.LogAnalyzer] (default task-59) Could not init log analyzer: java.io.IOException: Cannot create directory: /var/lib/openshift/542acde55004462dc4000549/.logAnalyzer
	at org.apache.lucene.store.NativeFSLock.obtain(NativeFSLockFactory.java:143) [lucene-core-4.10.0.jar:4.10.0 1620776 - rjernst - 2014-08-26 20:43:56]
	at org.apache.lucene.store.Lock.obtain(Lock.java:77) [lucene-core-4.10.0.jar:4.10.0 1620776 - rjernst - 2014-08-26 20:43:56]
	at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:755) [lucene-core-4.10.0.jar:4.10.0 1620776 - rjernst - 2014-08-26 20:43:56]
	at de.mobizcorp.log.demandware_analyzer.LogAnalyzer.init(LogAnalyzer.java:161) [classes:]
	at de.mobizcorp.log.demandware_analyzer.LogAnalyzer.<init>(LogAnalyzer.java:134) [classes:]
	at de.mobizcorp.log.demandware_analyzer.LogAnalyzer$$$view1.<init>(Unknown Source) [classes:]
	at sun.reflect.GeneratedConstructorAccessor32.newInstance(Unknown Source) [:1.8.0_05]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.8.0_05]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:408) [rt.jar:1.8.0_05]
	at java.lang.Class.newInstance(Class.java:433) [rt.jar:1.8.0_05]
	at org.jboss.invocation.proxy.AbstractClassFactory.newInstance(AbstractClassFactory.java:225)
	at org.jboss.invocation.proxy.ProxyFactory.newInstance(ProxyFactory.java:270)
	at org.jboss.as.ee.component.ViewService$DefaultViewInstanceFactory.createViewInstance(ViewService.java:271)
	at org.jboss.as.ee.component.ViewService$View.createInstance(ViewService.java:177)
	at org.jboss.as.ee.component.ViewService$View.createInstance(ViewService.java:173)
	at org.jboss.as.weld.ejb.SessionObjectReferenceImpl.getBusinessObject(SessionObjectReferenceImpl.java:95) [wildfly-weld-8.1.0.Final.jar:8.1.0.Final]
	at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:97) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
	at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
	at org.jboss.weld.bean.proxy.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:65) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
	at de.mobizcorp.log.demandware_analyzer.LogAnalyzer$Proxy$_$$_Weld$EnterpriseProxy$.getProgress(Unknown Source) [classes:]
	at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source) [:1.8.0_05]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_05]
	at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_05]
	at javax.el.BeanELResolver.getValue(BeanELResolver.java:363) [jboss-el-api_3.0_spec-1.0.3.Final.jar:1.0.3.Final]
	at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176) [jsf-impl-2.2.6-jbossorg-4.jar:]
	at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203) [jsf-impl-2.2.6-jbossorg-4.jar:]
	at com.sun.el.parser.AstValue.getValue(AstValue.java:140) [javax.el-3.0.0.jar:]
	at com.sun.el.parser.AstValue.getValue(AstValue.java:204) [javax.el-3.0.0.jar:]
	at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226) [javax.el-3.0.0.jar:]
	at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
	at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
	at com.sun.faces.facelets.el.ELText$ELTextVariable.writeText(ELText.java:238) [jsf-impl-2.2.6-jbossorg-4.jar:]
	at com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:85) [jsf-impl-2.2.6-jbossorg-4.jar:]
	at com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82) [jsf-impl-2.2.6-jbossorg-4.jar:]
	at com.sun.faces.facelets.compiler.UILeaf.encodeAll(UILeaf.java:183) [jsf-impl-2.2.6-jbossorg-4.jar:]
	at javax.faces.render.Renderer.encodeChildren(Renderer.java:176) [jboss-jsf-api_2.2_spec-2.2.6.jar:2.2.6]
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889) [jboss-jsf-api_2.2_spec-2.2.6.jar:2.2.6]
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1857) [jboss-jsf-api_2.2_spec-2.2.6.jar:2.2.6]
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1860) [jboss-jsf-api_2.2_spec-2.2.6.jar:2.2.6]
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1860) [jboss-jsf-api_2.2_spec-2.2.6.jar:2.2.6]
	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:461) [jsf-impl-2.2.6-jbossorg-4.jar:]
	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133) [jsf-impl-2.2.6-jbossorg-4.jar:]
	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) [jboss-jsf-api_2.2_spec-2.2.6.jar:2.2.6]
	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) [jboss-jsf-api_2.2_spec-2.2.6.jar:2.2.6]
	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) [jboss-jsf-api_2.2_spec-2.2.6.jar:2.2.6]
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) [jsf-impl-2.2.6-jbossorg-4.jar:]
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.2.6-jbossorg-4.jar:]
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) [jsf-impl-2.2.6-jbossorg-4.jar:]
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647) [jboss-jsf-api_2.2_spec-2.2.6.jar:2.2.6]
	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
	at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:177) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_05]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_05]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_05]


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