Mount persistent volumes for S2I images#4918
Conversation
|
/test v4.7-integration-e2e |
|
/retest |
|
/test psi-unit-test-windows |
|
/test v4.7-integration-e2e |
2 similar comments
|
/test v4.7-integration-e2e |
|
/test v4.7-integration-e2e |
d52066b to
8a2de6a
Compare
8a2de6a to
ff83955
Compare
|
/test psi-kubernetes-integration-e2e |
|
@feloy I feel there is some real failures with services on kubernetes. I have just overlooked the logs and suspect most of the failures with linking while doing Could you please have a look. |
706d712 to
ff83955
Compare
|
/test psi-kubernetes-integration-e2e |
ff83955 to
142b5e9
Compare
|
✔️ Deploy Preview for odo-docusaurus-preview ready! 🔨 Explore the source changes: ed24f28 🔍 Inspect the deploy log: https://app.netlify.com/sites/odo-docusaurus-preview/deploys/613a0a8e3c92d5000830569d 😎 Browse the preview: https://deploy-preview-4918--odo-docusaurus-preview.netlify.app |
|
/test psi-unit-test-windows |
|
/test psi-kubernetes-integration-e2e |
|
/test v4.8-integration-e2e (passes locally) |
|
PVC errors /test v4.8-integration-e2e |
|
@feloy What was the verdict on this PR? I remember you brought up that this PR might not be relevant with the removal of S2I comp. Are we still bringing this in? Is it RFR? |
We are waiting for Tomas' opinion if |
Not in this PR. This PR should be just about fixing the issues with volumes and file permissions |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kadel The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
4027297 to
6ed4ee4
Compare
|
@feloy: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
/test v4.8-integration-e2e Test passes locally |
|
@feloy I was unable to push wildfly image to the cluster. Here is the error - ➜ odo push --show-log
Validation
✓ Validating the devfile [159314ns]
Creating Services for component wildfly-wildfly-vyyz
✓ Services are in sync with the cluster, no changes are required
Creating Kubernetes resources for component wildfly-wildfly-vyyz
✓ Waiting for component to start [388ms]
✓ Links are in sync with the cluster, no changes are required
✓ Waiting for component to start [412ms]
Applying URL changes
✓ URL http-8778: http://http-8778-app-myproject.apps.ci-ln-glxhklt-f76d1.origin-ci-int-gce.dev.openshift.com/ created
✓ URL http-8080: http://http-8080-app-myproject.apps.ci-ln-glxhklt-f76d1.origin-ci-int-gce.dev.openshift.com/ created
Syncing to component wildfly-wildfly-vyyz
✓ Checking file changes for pushing [615818ns]
✓ Syncing files to the component [8s]
Executing devfile commands for component wildfly-wildfly-vyyz
• Executing s2i-assemble command "/opt/odo/bin/s2i-setup && /opt/odo/bin/assemble-and-restart" ...
+ set -eo pipefail
+ PV_MNT_PT=/opt/app-root
+ ODO_UTILS_DIR=/opt/odo
+ '[' '!' -f /opt/app-root/conf/supervisor.conf ']'
+ cp -rp /opt/odo/conf /opt/app-root
+ mkdir -p /tmp
+ touch /tmp/.dummy
+ mkdir -p /tmp/src/
+ touch /tmp/src/.dummy
+ [[ /tmp != *\/\s\r\c* ]]
+ mkdir -p /tmp/src
+ touch /tmp/src/.dummy
+ mkdir -p /opt/app-root/src
+ '[' '!' -z true ']'
+ rsync -ar /tmp/projects/ /tmp/src
+ set -eo pipefail
+ export ODO_UTILS_DIR=/opt/odo
+ ODO_UTILS_DIR=/opt/odo
+ export ODO_IMAGE_MAPPINGS_FILE=/opt/odo/language-scripts/image-mappings.json
+ ODO_IMAGE_MAPPINGS_FILE=/opt/odo/language-scripts/image-mappings.json
++ /opt/odo/bin/getlanguage
+ IMAGE_LANG=
+ '[' '!' -z /home/jboss ']'
+ '[' /tmp '!=' /home/jboss ']'
+ '[' -n /opt/app-root/src-backup ']'
+ '[' '!' -d /opt/app-root/src-backup ']'
+ mkdir -p /opt/app-root/src-backup/src
+ rsync -rlO /tmp/src/. /opt/app-root/src-backup/src/
+ b_IFS='
'
+ b_OFS=
+ OIFS='
'
+ IFS='
'
++ ls -A /tmp/src/
+ for file in '`ls -A ${ODO_S2I_SRC_BIN_PATH}/src/`'
+ rm -fr /home/jboss/.dummy
+ for file in '`ls -A ${ODO_S2I_SRC_BIN_PATH}/src/`'
+ rm -fr /home/jboss/.gitignore
+ for file in '`ls -A ${ODO_S2I_SRC_BIN_PATH}/src/`'
+ rm -fr /home/jboss/devfile.yaml
+ for file in '`ls -A ${ODO_S2I_SRC_BIN_PATH}/src/`'
+ rm -fr /home/jboss/pom.xml
+ for file in '`ls -A ${ODO_S2I_SRC_BIN_PATH}/src/`'
+ rm -fr /home/jboss/src
+ OIFS=
+ IFS='
'
+ '[' -n centos7/s2i-base-centos7 ']'
+ '[' centos7/s2i-base-centos7 == redhat-openjdk-18/openjdk18-openshift ']'
+ '[' -f /tmp/src/.s2i/bin/assemble ']'
+ '[' -n '' ']'
+ '[' -n /usr/local/s2i ']'
+ rm -rf /opt/app-root/src/.git
+ /usr/local/s2i/assemble
/opt/odo/bin/assemble-and-restart: line 63: /usr/local/s2i/assemble: No such file or directory
✗ Executing s2i-assemble command "/opt/odo/bin/s2i-setup && /opt/odo/bin/assemble-and-restart" [4s]
✗ Failed to start component with name "wildfly-wildfly-vyyz". Error: Failed to create the component: command execution failed: unable to execute the run command: unable to exec command [/bin/sh -c /opt/odo/bin/s2i-setup && /opt/odo/bin/assemble-and-restart]:
+ set -eo pipefail
+ PV_MNT_PT=/opt/app-root
+ ODO_UTILS_DIR=/opt/odo
+ '[' '!' -f /opt/app-root/conf/supervisor.conf ']'
+ cp -rp /opt/odo/conf /opt/app-root
+ mkdir -p /tmp
+ touch /tmp/.dummy
+ mkdir -p /tmp/src/
+ touch /tmp/src/.dummy
+ [[ /tmp != *\/\s\r\c* ]]
+ mkdir -p /tmp/src
+ touch /tmp/src/.dummy
+ mkdir -p /opt/app-root/src
+ '[' '!' -z true ']'
+ rsync -ar /tmp/projects/ /tmp/src
+ set -eo pipefail
+ export ODO_UTILS_DIR=/opt/odo
+ ODO_UTILS_DIR=/opt/odo
+ export ODO_IMAGE_MAPPINGS_FILE=/opt/odo/language-scripts/image-mappings.json
+ ODO_IMAGE_MAPPINGS_FILE=/opt/odo/language-scripts/image-mappings.json
++ /opt/odo/bin/getlanguage
+ IMAGE_LANG=
+ '[' '!' -z /home/jboss ']'
+ '[' /tmp '!=' /home/jboss ']'
+ '[' -n /opt/app-root/src-backup ']'
+ '[' '!' -d /opt/app-root/src-backup ']'
+ mkdir -p /opt/app-root/src-backup/src
+ rsync -rlO /tmp/src/. /opt/app-root/src-backup/src/
+ b_IFS='
'
+ b_OFS=
+ OIFS='
'
+ IFS='
'
++ ls -A /tmp/src/
+ for file in '`ls -A ${ODO_S2I_SRC_BIN_PATH}/src/`'
+ rm -fr /home/jboss/.dummy
+ for file in '`ls -A ${ODO_S2I_SRC_BIN_PATH}/src/`'
+ rm -fr /home/jboss/.gitignore
+ for file in '`ls -A ${ODO_S2I_SRC_BIN_PATH}/src/`'
+ rm -fr /home/jboss/devfile.yaml
+ for file in '`ls -A ${ODO_S2I_SRC_BIN_PATH}/src/`'
+ rm -fr /home/jboss/pom.xml
+ for file in '`ls -A ${ODO_S2I_SRC_BIN_PATH}/src/`'
+ rm -fr /home/jboss/src
+ OIFS=
+ IFS='
'
+ '[' -n centos7/s2i-base-centos7 ']'
+ '[' centos7/s2i-base-centos7 == redhat-openjdk-18/openjdk18-openshift ']'
+ '[' -f /tmp/src/.s2i/bin/assemble ']'
+ '[' -n '' ']'
+ '[' -n /usr/local/s2i ']'
+ rm -rf /opt/app-root/src/.git
+ /usr/local/s2i/assemble
/opt/odo/bin/assemble-and-restart: line 63: /usr/local/s2i/assemble: No such file or directory
: error while streaming command: command terminated with exit code 1
Do you think I am missing something or does this seem unrelated to your changes? |
[...]
You need to replace Not sure if the problem is specific to the wildfly s2i information or if we can fix this in odo |
valaparthvi
left a comment
There was a problem hiding this comment.
The code lgtm but do we need 1 or 2 more integration tests to verify these changes or do we already have enough tests? Also, do you think we need to modify unit tests(storage/kubernetes_test.go) to accommodate the new changes?
| Command: []string{ | ||
| "/bin/sh", | ||
| "-c", | ||
| "[ -d /opt/app-root ] && cp -R /opt/app-root /mnt/ || true", |
There was a problem hiding this comment.
I don't understand this script. Does this mean that regardless of any error, it will always return true?
There was a problem hiding this comment.
Yes, the script will always return true, even if some error occurs during copying the files. This is to prevent the initContainer to finish as Error, that would terminate the pod immediately
| var deploymentDir string | ||
| for _, env := range s2iEnv { | ||
| if env.Name == "ODO_S2I_DEPLOYMENT_DIR" { | ||
| deploymentDir = env.Value | ||
| break | ||
| } | ||
| } | ||
|
|
||
| separateDeploymentsMount := len(deploymentDir) > 0 && !strings.HasPrefix(deploymentDir, occlient.DefaultAppRootDir) |
There was a problem hiding this comment.
Can you move this code to L356 ? I think it will make it easier to understand the code.
I will work on adding some integration and/or unit tests |
6ed4ee4 to
ed24f28
Compare
|
SonarCloud Quality Gate failed.
|
valaparthvi
left a comment
There was a problem hiding this comment.
Thanks for working on all the requested changes, Philippe.
| When("creating a component from s2i wildfly", func() { | ||
|
|
||
| BeforeEach(func() { | ||
| helper.Cmd("odo", "component", "create", "--s2i", "wildfly", "--project", commonVar.Project).ShouldPass() |
There was a problem hiding this comment.
Do we need to add that imagestream or does it work as is?
There was a problem hiding this comment.
I think the imagestream is installed from this script: scripts/configure-installer-tests-cluster.sh (https://github.com/openshift/odo/blob/main/scripts/configure-installer-tests-cluster.sh#L43)








What type of PR is this?
/kind bug
What does this PR do / why we need it:
This PR:
Which issue(s) this PR fixes:
Fixes #4623
PR acceptance criteria:
Unit test
Integration test
Documentation
Update changelog
I have read the test guidelines
How to test changes / Special notes to the reviewer:
or