[jbosstools-issues] [JBoss JIRA] (JBIDE-25700) Hot deploy of Spring Boot on OpenShift is not working with OpenShift Online

Andre Dietisheim (JIRA) issues at jboss.org
Tue Mar 20 07:05:01 EDT 2018


    [ https://issues.jboss.org/browse/JBIDE-25700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13548331#comment-13548331 ] 

Andre Dietisheim edited comment on JBIDE-25700 at 3/20/18 7:04 AM:
-------------------------------------------------------------------

[~rhuss] afaik BOOT-INF is created when the springboot-app-jar is exploded: https://github.com/fabric8io-images/s2i/blob/66e43a82178744bf3d0e0ddd3b6abb2762734dca/java/images/jboss/s2i/assemble#L219

I test this using the fuse-on-openshift example attached [here|https://issues.jboss.org/secure/attachment/12432614/fuse-on-openshift.zip].
I then deploy it using the fabric8 maven deploy plugin with a cmd similar to the following:
{code}
mvn clean install fabric8:deploy \
-Dkubernetes.master=https://console.starter-us-east-1.openshift.com \
-Dkubernetes.namespace=camel-ose-springboot-xml \
-Dkubernetes.auth.basic.username=adietish at redhat.com \
-Dkubernetes.auth.basic.password=XXXXXXXXXX \
-Dfabric8.mode=openshift \
-Dkubernetes.trust.certificates=true \
-Dfabric8.build.strategy=s2i \
-Dkubernetes.auth.tryServiceAccount=false \
-Dfabric8.generator.from=fabric8/s2i-java \
-Dfabric8.generator.fromMode=docker \
-Dkubernetes.auth.tryKubeConfig=false
{code}

once I have a pod running I get into target/classes and rsync via oc:
{code}
oc rsync --server=https://console.starter-us-east-1.openshift.com -n camel-ose-springboot-xml org <POD>:/deployments/BOOT-INF/classes/
{code}

The output I get is then
{code}
building file list ... done
org/
org/mycompany/
org/mycompany/Application.class
org/mycompany/MyTransformer.class

sent 230 bytes  received 100 bytes  132.00 bytes/sec
total size is 1504  speedup is 4.56
rsync: failed to set permissions on "/deployments/BOOT-INF/classes/org": Operation not permitted (1)
rsync: failed to set permissions on "/deployments/BOOT-INF/classes/org/mycompany": Operation not permitted (1)
rsync error: some files could not be transferred (code 23) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-52/rsync/main.c(996) [sender=2.6.9]
error: exit status 23
{code}


was (Author: adietish):
[~rhuss] afaik BOOT-INF is created when the springboot-app-jar is exploded: https://github.com/fabric8io-images/s2i/blob/66e43a82178744bf3d0e0ddd3b6abb2762734dca/java/images/jboss/s2i/assemble#L219

I test this using the fuse-on-openshift example attached [here|https://issues.jboss.org/secure/attachment/12432614/fuse-on-openshift.zip].
I then deploy it using the fabric8 maven deploy plugin with a cmd similar to the following:
{code}
mvn clean install fabric8:deploy \
-Dkubernetes.master=https://console.starter-us-east-1.openshift.com \
-Dkubernetes.namespace=camel-ose-springboot-xml \
-Dkubernetes.auth.basic.username=adietish at redhat.com \
-Dkubernetes.auth.basic.password=XXXXXXXXXX \
-Dfabric8.mode=openshift \
-Dkubernetes.trust.certificates=true \
-Dfabric8.build.strategy=s2i \
-Dkubernetes.auth.tryServiceAccount=false \
-Dfabric8.generator.from=fabric8/s2i-java \
-Dfabric8.generator.fromMode=docker \
-Dkubernetes.auth.tryKubeConfig=false
{code}

once I have a pod running I get into target/classes and rsync via oc:
oc rsync --server=https://console.starter-us-east-1.openshift.com -n camel-ose-springboot-xml org <POD>:/deployments/BOOT-INF/classes/

The output I get is then
{code}
building file list ... done
org/
org/mycompany/
org/mycompany/Application.class
org/mycompany/MyTransformer.class

sent 230 bytes  received 100 bytes  132.00 bytes/sec
total size is 1504  speedup is 4.56
rsync: failed to set permissions on "/deployments/BOOT-INF/classes/org": Operation not permitted (1)
rsync: failed to set permissions on "/deployments/BOOT-INF/classes/org/mycompany": Operation not permitted (1)
rsync error: some files could not be transferred (code 23) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-52/rsync/main.c(996) [sender=2.6.9]
error: exit status 23
{code}

> Hot deploy of Spring Boot on OpenShift is not working with OpenShift Online
> ---------------------------------------------------------------------------
>
>                 Key: JBIDE-25700
>                 URL: https://issues.jboss.org/browse/JBIDE-25700
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: openshift
>    Affects Versions: 4.5.2.Final
>            Reporter: Aurélien Pupier
>            Assignee: Andre Dietisheim
>            Priority: Critical
>              Labels: online, springboot
>             Fix For: 4.5.3.AM3
>
>
> neither with open.paas.redhat.com
> so only when using the CDK.
> it seems to be due to the fact that the user in the pod are not the same.
> Jeff said:
> {quote}
> For SpringBoot deployments, the application file is called a fat jar and it placed in the /deployments folder (images are upstream fabric8/s2i-java or imagestream redhat-openjdk18-openshift). In order to get live update the file is then unzipped to the /deployments folder leaded to new sub folders BOOT-INF and META-INF
> The user permissions on those folders are the following:
> /deployments: writable by user jboss and group root
> /deployments/BOOT-INF: writable by user jboss readable only by group root
> /deployments/META-INF: writable by user jboss readable only by group root
> The rsync process with create some sub folders under /deployments/BOOT-INF. The problem that we have is that the user that is assigned for the rsync operation (or when you open a terminal in the OpenShift console) is not jboss (as opposed to Minishift/CDK) and thus we have permissions errors during the rsync operation.
> {quote}



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)



More information about the jbosstools-issues mailing list