Openshift container as root user
Hi Iam working on CICD implementation on openshift 3.9. I have a jenkins pod running in openshift. Iam running selenium scripts in jenkins and below is the error which iam getting like missing a package
Running TestSuite
/var/lib/jenkins/jobs/Pipeline/workspace/src/test/resources/chromedriver: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory
Nov 21, 2018 8:25:36 AM org.openqa.selenium.os.OsProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 127 (Exit value: 127)
Tests run: 8, Failures: 1, Errors: 0, Skipped: 7, Time elapsed: 21.9 sec <<< FAILURE! - in TestSuite
BrowserSettings(SecurityCheckList) Time elapsed: 21.273 sec <<< FAILURE!
org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '3.9.1', revision: '63f7b50', time: '2018-02-07T22:25:02.294Z'
System info: host: 'jenkins-1-7zgld', ip: '10.131.0.32', os.name: 'Linux', os.arch: 'i386', os.version: '3.10.0-957.el7.x86_64', java.version: '1.8.0_181'
Driver info: driver.version: ChromeDriver
at java.util.concurrent.FutureTask.get(FutureTask.java:205)
at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:148)
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:75)
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:187)
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:178)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:79)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
For that i want to install libgconf-2-4 in my jenkins container through the below command
yum install libgconf-2-4
When i try to install the below error is coming in my jenkins container
sh-4.2$ yum install libgconf2-4
Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager
[Errno 13] Permission denied: '/etc/pki/entitlement-host'
ovl: Error while doing RPMdb copy-up:
[Errno 13] Permission denied: '/var/lib/rpm/.dbenv.lock'
You need to be root to perform this command.
When i goto specified location and try to change the permissions as chmod 777 .dbenv.lock
sh-4.2$ cd /var/lib/rpm/
sh-4.2$ ls -latr
total 19560
-rw-r--r--. 1 root root 0 Aug 9 18:21 .dbenv.lock
it is throwing error as
sh-4.2$ chmod 777 .dbenv.lock
chmod: changing permissions of ‘.dbenv.lock’: Operation not permitted
My question is how to enter into jenkins pod as root user and install the rpm package libgconf-2-4 through yum install libgconf-2-4 in openshift?
jenkins openshift jenkins-pipeline openshift-origin openshift-3
add a comment |
Hi Iam working on CICD implementation on openshift 3.9. I have a jenkins pod running in openshift. Iam running selenium scripts in jenkins and below is the error which iam getting like missing a package
Running TestSuite
/var/lib/jenkins/jobs/Pipeline/workspace/src/test/resources/chromedriver: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory
Nov 21, 2018 8:25:36 AM org.openqa.selenium.os.OsProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 127 (Exit value: 127)
Tests run: 8, Failures: 1, Errors: 0, Skipped: 7, Time elapsed: 21.9 sec <<< FAILURE! - in TestSuite
BrowserSettings(SecurityCheckList) Time elapsed: 21.273 sec <<< FAILURE!
org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '3.9.1', revision: '63f7b50', time: '2018-02-07T22:25:02.294Z'
System info: host: 'jenkins-1-7zgld', ip: '10.131.0.32', os.name: 'Linux', os.arch: 'i386', os.version: '3.10.0-957.el7.x86_64', java.version: '1.8.0_181'
Driver info: driver.version: ChromeDriver
at java.util.concurrent.FutureTask.get(FutureTask.java:205)
at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:148)
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:75)
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:187)
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:178)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:79)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
For that i want to install libgconf-2-4 in my jenkins container through the below command
yum install libgconf-2-4
When i try to install the below error is coming in my jenkins container
sh-4.2$ yum install libgconf2-4
Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager
[Errno 13] Permission denied: '/etc/pki/entitlement-host'
ovl: Error while doing RPMdb copy-up:
[Errno 13] Permission denied: '/var/lib/rpm/.dbenv.lock'
You need to be root to perform this command.
When i goto specified location and try to change the permissions as chmod 777 .dbenv.lock
sh-4.2$ cd /var/lib/rpm/
sh-4.2$ ls -latr
total 19560
-rw-r--r--. 1 root root 0 Aug 9 18:21 .dbenv.lock
it is throwing error as
sh-4.2$ chmod 777 .dbenv.lock
chmod: changing permissions of ‘.dbenv.lock’: Operation not permitted
My question is how to enter into jenkins pod as root user and install the rpm package libgconf-2-4 through yum install libgconf-2-4 in openshift?
jenkins openshift jenkins-pipeline openshift-origin openshift-3
add a comment |
Hi Iam working on CICD implementation on openshift 3.9. I have a jenkins pod running in openshift. Iam running selenium scripts in jenkins and below is the error which iam getting like missing a package
Running TestSuite
/var/lib/jenkins/jobs/Pipeline/workspace/src/test/resources/chromedriver: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory
Nov 21, 2018 8:25:36 AM org.openqa.selenium.os.OsProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 127 (Exit value: 127)
Tests run: 8, Failures: 1, Errors: 0, Skipped: 7, Time elapsed: 21.9 sec <<< FAILURE! - in TestSuite
BrowserSettings(SecurityCheckList) Time elapsed: 21.273 sec <<< FAILURE!
org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '3.9.1', revision: '63f7b50', time: '2018-02-07T22:25:02.294Z'
System info: host: 'jenkins-1-7zgld', ip: '10.131.0.32', os.name: 'Linux', os.arch: 'i386', os.version: '3.10.0-957.el7.x86_64', java.version: '1.8.0_181'
Driver info: driver.version: ChromeDriver
at java.util.concurrent.FutureTask.get(FutureTask.java:205)
at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:148)
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:75)
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:187)
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:178)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:79)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
For that i want to install libgconf-2-4 in my jenkins container through the below command
yum install libgconf-2-4
When i try to install the below error is coming in my jenkins container
sh-4.2$ yum install libgconf2-4
Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager
[Errno 13] Permission denied: '/etc/pki/entitlement-host'
ovl: Error while doing RPMdb copy-up:
[Errno 13] Permission denied: '/var/lib/rpm/.dbenv.lock'
You need to be root to perform this command.
When i goto specified location and try to change the permissions as chmod 777 .dbenv.lock
sh-4.2$ cd /var/lib/rpm/
sh-4.2$ ls -latr
total 19560
-rw-r--r--. 1 root root 0 Aug 9 18:21 .dbenv.lock
it is throwing error as
sh-4.2$ chmod 777 .dbenv.lock
chmod: changing permissions of ‘.dbenv.lock’: Operation not permitted
My question is how to enter into jenkins pod as root user and install the rpm package libgconf-2-4 through yum install libgconf-2-4 in openshift?
jenkins openshift jenkins-pipeline openshift-origin openshift-3
Hi Iam working on CICD implementation on openshift 3.9. I have a jenkins pod running in openshift. Iam running selenium scripts in jenkins and below is the error which iam getting like missing a package
Running TestSuite
/var/lib/jenkins/jobs/Pipeline/workspace/src/test/resources/chromedriver: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory
Nov 21, 2018 8:25:36 AM org.openqa.selenium.os.OsProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 127 (Exit value: 127)
Tests run: 8, Failures: 1, Errors: 0, Skipped: 7, Time elapsed: 21.9 sec <<< FAILURE! - in TestSuite
BrowserSettings(SecurityCheckList) Time elapsed: 21.273 sec <<< FAILURE!
org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '3.9.1', revision: '63f7b50', time: '2018-02-07T22:25:02.294Z'
System info: host: 'jenkins-1-7zgld', ip: '10.131.0.32', os.name: 'Linux', os.arch: 'i386', os.version: '3.10.0-957.el7.x86_64', java.version: '1.8.0_181'
Driver info: driver.version: ChromeDriver
at java.util.concurrent.FutureTask.get(FutureTask.java:205)
at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:148)
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:75)
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:187)
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:178)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:79)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
For that i want to install libgconf-2-4 in my jenkins container through the below command
yum install libgconf-2-4
When i try to install the below error is coming in my jenkins container
sh-4.2$ yum install libgconf2-4
Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager
[Errno 13] Permission denied: '/etc/pki/entitlement-host'
ovl: Error while doing RPMdb copy-up:
[Errno 13] Permission denied: '/var/lib/rpm/.dbenv.lock'
You need to be root to perform this command.
When i goto specified location and try to change the permissions as chmod 777 .dbenv.lock
sh-4.2$ cd /var/lib/rpm/
sh-4.2$ ls -latr
total 19560
-rw-r--r--. 1 root root 0 Aug 9 18:21 .dbenv.lock
it is throwing error as
sh-4.2$ chmod 777 .dbenv.lock
chmod: changing permissions of ‘.dbenv.lock’: Operation not permitted
My question is how to enter into jenkins pod as root user and install the rpm package libgconf-2-4 through yum install libgconf-2-4 in openshift?
jenkins openshift jenkins-pipeline openshift-origin openshift-3
jenkins openshift jenkins-pipeline openshift-origin openshift-3
asked Nov 21 '18 at 8:52
sudhirsudhir
367
367
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
It seems you should customize the jenkins
images as follows.[0]
Create the
Dockerfile
.
FROM registry.access.redhat.com/openshift3/jenkins-2-rhel7
USER 0
RUN yum -y install libgconf2-4 && yum clean all -y
USER 1001
Build the image using the
Dockerfile
.
docker build .
Login the internal registry of
OpenShift
for pushing image.
docker login -u admin -p docker-registry.default.svc:5000
Retag as
OpenShift
image format and your tag policy.
docker tag docker-registry.default.svc:5000/openshift/jenkins-2-rhel7-custom
Push the
image
.
docker push docker-registry.default.svc:5000/openshift/jenkins-2-rhel7-custom
Edit your
deploymentConfig
oc edit dc/jenkins
...
containers:
...
image: "openshift/jenkins-2-rhel7-custom"
...
I hope it help you. :^)
[0]General Container Image Guidelines
Hi I have already setup jenkins and configurations are made on same pod. Could you let me know if i can have root access to my present pod instead of repeating the above steps. Is there a posiibility to get root access to the current running pod?
– sudhir
Nov 22 '18 at 15:40
@sudbir Yes, you can get root permission as granting anyuid to jenkins service account. “oc adm policy add-scc-to-user anyuid -z jenkins”, refer Enable Container Images that Require Root for more details.
– Daein Park
Nov 22 '18 at 22:58
Hi I have used that command “oc adm policy add-scc-to-user anyuid -z jenkins” and logged in through putty with "oc rsh <jenkins pod>. but still when i install a package "yum install libgconf2-4" it gives below error. sh-4.2$ yum install libgconf2-4 Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager [Errno 13] Permission denied: '/etc/pki/entitlement-host' ovl: Error while doing RPMdb copy-up: [Errno 13] Permission denied: '/var/lib/rpm/.dbenv.lock' You need to be root to perform this command. What am i missing here to enter the container as root user?
– sudhir
Nov 23 '18 at 6:54
Would you check the uid usingid
cmd afteroc rsh <jenkins pod>
? You should restart the pod afteroc adm policy
cmd for changes. Andlibgconf2-4
package is not existing in RHEL repositories, is it correct name ?
– Daein Park
Nov 23 '18 at 13:02
when i do oc rsh <jenkinspod> it gives sh-4.2$ id uid=1000130000(default) gid=0(root) groups=0(root),2001,1000130000 Iam looking on how to restart pod as well. Could u let me the command where i can restart that particularpod only.
– sudhir
Nov 27 '18 at 6:12
|
show 3 more comments
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53408296%2fopenshift-container-as-root-user%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It seems you should customize the jenkins
images as follows.[0]
Create the
Dockerfile
.
FROM registry.access.redhat.com/openshift3/jenkins-2-rhel7
USER 0
RUN yum -y install libgconf2-4 && yum clean all -y
USER 1001
Build the image using the
Dockerfile
.
docker build .
Login the internal registry of
OpenShift
for pushing image.
docker login -u admin -p docker-registry.default.svc:5000
Retag as
OpenShift
image format and your tag policy.
docker tag docker-registry.default.svc:5000/openshift/jenkins-2-rhel7-custom
Push the
image
.
docker push docker-registry.default.svc:5000/openshift/jenkins-2-rhel7-custom
Edit your
deploymentConfig
oc edit dc/jenkins
...
containers:
...
image: "openshift/jenkins-2-rhel7-custom"
...
I hope it help you. :^)
[0]General Container Image Guidelines
Hi I have already setup jenkins and configurations are made on same pod. Could you let me know if i can have root access to my present pod instead of repeating the above steps. Is there a posiibility to get root access to the current running pod?
– sudhir
Nov 22 '18 at 15:40
@sudbir Yes, you can get root permission as granting anyuid to jenkins service account. “oc adm policy add-scc-to-user anyuid -z jenkins”, refer Enable Container Images that Require Root for more details.
– Daein Park
Nov 22 '18 at 22:58
Hi I have used that command “oc adm policy add-scc-to-user anyuid -z jenkins” and logged in through putty with "oc rsh <jenkins pod>. but still when i install a package "yum install libgconf2-4" it gives below error. sh-4.2$ yum install libgconf2-4 Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager [Errno 13] Permission denied: '/etc/pki/entitlement-host' ovl: Error while doing RPMdb copy-up: [Errno 13] Permission denied: '/var/lib/rpm/.dbenv.lock' You need to be root to perform this command. What am i missing here to enter the container as root user?
– sudhir
Nov 23 '18 at 6:54
Would you check the uid usingid
cmd afteroc rsh <jenkins pod>
? You should restart the pod afteroc adm policy
cmd for changes. Andlibgconf2-4
package is not existing in RHEL repositories, is it correct name ?
– Daein Park
Nov 23 '18 at 13:02
when i do oc rsh <jenkinspod> it gives sh-4.2$ id uid=1000130000(default) gid=0(root) groups=0(root),2001,1000130000 Iam looking on how to restart pod as well. Could u let me the command where i can restart that particularpod only.
– sudhir
Nov 27 '18 at 6:12
|
show 3 more comments
It seems you should customize the jenkins
images as follows.[0]
Create the
Dockerfile
.
FROM registry.access.redhat.com/openshift3/jenkins-2-rhel7
USER 0
RUN yum -y install libgconf2-4 && yum clean all -y
USER 1001
Build the image using the
Dockerfile
.
docker build .
Login the internal registry of
OpenShift
for pushing image.
docker login -u admin -p docker-registry.default.svc:5000
Retag as
OpenShift
image format and your tag policy.
docker tag docker-registry.default.svc:5000/openshift/jenkins-2-rhel7-custom
Push the
image
.
docker push docker-registry.default.svc:5000/openshift/jenkins-2-rhel7-custom
Edit your
deploymentConfig
oc edit dc/jenkins
...
containers:
...
image: "openshift/jenkins-2-rhel7-custom"
...
I hope it help you. :^)
[0]General Container Image Guidelines
Hi I have already setup jenkins and configurations are made on same pod. Could you let me know if i can have root access to my present pod instead of repeating the above steps. Is there a posiibility to get root access to the current running pod?
– sudhir
Nov 22 '18 at 15:40
@sudbir Yes, you can get root permission as granting anyuid to jenkins service account. “oc adm policy add-scc-to-user anyuid -z jenkins”, refer Enable Container Images that Require Root for more details.
– Daein Park
Nov 22 '18 at 22:58
Hi I have used that command “oc adm policy add-scc-to-user anyuid -z jenkins” and logged in through putty with "oc rsh <jenkins pod>. but still when i install a package "yum install libgconf2-4" it gives below error. sh-4.2$ yum install libgconf2-4 Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager [Errno 13] Permission denied: '/etc/pki/entitlement-host' ovl: Error while doing RPMdb copy-up: [Errno 13] Permission denied: '/var/lib/rpm/.dbenv.lock' You need to be root to perform this command. What am i missing here to enter the container as root user?
– sudhir
Nov 23 '18 at 6:54
Would you check the uid usingid
cmd afteroc rsh <jenkins pod>
? You should restart the pod afteroc adm policy
cmd for changes. Andlibgconf2-4
package is not existing in RHEL repositories, is it correct name ?
– Daein Park
Nov 23 '18 at 13:02
when i do oc rsh <jenkinspod> it gives sh-4.2$ id uid=1000130000(default) gid=0(root) groups=0(root),2001,1000130000 Iam looking on how to restart pod as well. Could u let me the command where i can restart that particularpod only.
– sudhir
Nov 27 '18 at 6:12
|
show 3 more comments
It seems you should customize the jenkins
images as follows.[0]
Create the
Dockerfile
.
FROM registry.access.redhat.com/openshift3/jenkins-2-rhel7
USER 0
RUN yum -y install libgconf2-4 && yum clean all -y
USER 1001
Build the image using the
Dockerfile
.
docker build .
Login the internal registry of
OpenShift
for pushing image.
docker login -u admin -p docker-registry.default.svc:5000
Retag as
OpenShift
image format and your tag policy.
docker tag docker-registry.default.svc:5000/openshift/jenkins-2-rhel7-custom
Push the
image
.
docker push docker-registry.default.svc:5000/openshift/jenkins-2-rhel7-custom
Edit your
deploymentConfig
oc edit dc/jenkins
...
containers:
...
image: "openshift/jenkins-2-rhel7-custom"
...
I hope it help you. :^)
[0]General Container Image Guidelines
It seems you should customize the jenkins
images as follows.[0]
Create the
Dockerfile
.
FROM registry.access.redhat.com/openshift3/jenkins-2-rhel7
USER 0
RUN yum -y install libgconf2-4 && yum clean all -y
USER 1001
Build the image using the
Dockerfile
.
docker build .
Login the internal registry of
OpenShift
for pushing image.
docker login -u admin -p docker-registry.default.svc:5000
Retag as
OpenShift
image format and your tag policy.
docker tag docker-registry.default.svc:5000/openshift/jenkins-2-rhel7-custom
Push the
image
.
docker push docker-registry.default.svc:5000/openshift/jenkins-2-rhel7-custom
Edit your
deploymentConfig
oc edit dc/jenkins
...
containers:
...
image: "openshift/jenkins-2-rhel7-custom"
...
I hope it help you. :^)
[0]General Container Image Guidelines
answered Nov 21 '18 at 12:41
Daein ParkDaein Park
1,02539
1,02539
Hi I have already setup jenkins and configurations are made on same pod. Could you let me know if i can have root access to my present pod instead of repeating the above steps. Is there a posiibility to get root access to the current running pod?
– sudhir
Nov 22 '18 at 15:40
@sudbir Yes, you can get root permission as granting anyuid to jenkins service account. “oc adm policy add-scc-to-user anyuid -z jenkins”, refer Enable Container Images that Require Root for more details.
– Daein Park
Nov 22 '18 at 22:58
Hi I have used that command “oc adm policy add-scc-to-user anyuid -z jenkins” and logged in through putty with "oc rsh <jenkins pod>. but still when i install a package "yum install libgconf2-4" it gives below error. sh-4.2$ yum install libgconf2-4 Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager [Errno 13] Permission denied: '/etc/pki/entitlement-host' ovl: Error while doing RPMdb copy-up: [Errno 13] Permission denied: '/var/lib/rpm/.dbenv.lock' You need to be root to perform this command. What am i missing here to enter the container as root user?
– sudhir
Nov 23 '18 at 6:54
Would you check the uid usingid
cmd afteroc rsh <jenkins pod>
? You should restart the pod afteroc adm policy
cmd for changes. Andlibgconf2-4
package is not existing in RHEL repositories, is it correct name ?
– Daein Park
Nov 23 '18 at 13:02
when i do oc rsh <jenkinspod> it gives sh-4.2$ id uid=1000130000(default) gid=0(root) groups=0(root),2001,1000130000 Iam looking on how to restart pod as well. Could u let me the command where i can restart that particularpod only.
– sudhir
Nov 27 '18 at 6:12
|
show 3 more comments
Hi I have already setup jenkins and configurations are made on same pod. Could you let me know if i can have root access to my present pod instead of repeating the above steps. Is there a posiibility to get root access to the current running pod?
– sudhir
Nov 22 '18 at 15:40
@sudbir Yes, you can get root permission as granting anyuid to jenkins service account. “oc adm policy add-scc-to-user anyuid -z jenkins”, refer Enable Container Images that Require Root for more details.
– Daein Park
Nov 22 '18 at 22:58
Hi I have used that command “oc adm policy add-scc-to-user anyuid -z jenkins” and logged in through putty with "oc rsh <jenkins pod>. but still when i install a package "yum install libgconf2-4" it gives below error. sh-4.2$ yum install libgconf2-4 Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager [Errno 13] Permission denied: '/etc/pki/entitlement-host' ovl: Error while doing RPMdb copy-up: [Errno 13] Permission denied: '/var/lib/rpm/.dbenv.lock' You need to be root to perform this command. What am i missing here to enter the container as root user?
– sudhir
Nov 23 '18 at 6:54
Would you check the uid usingid
cmd afteroc rsh <jenkins pod>
? You should restart the pod afteroc adm policy
cmd for changes. Andlibgconf2-4
package is not existing in RHEL repositories, is it correct name ?
– Daein Park
Nov 23 '18 at 13:02
when i do oc rsh <jenkinspod> it gives sh-4.2$ id uid=1000130000(default) gid=0(root) groups=0(root),2001,1000130000 Iam looking on how to restart pod as well. Could u let me the command where i can restart that particularpod only.
– sudhir
Nov 27 '18 at 6:12
Hi I have already setup jenkins and configurations are made on same pod. Could you let me know if i can have root access to my present pod instead of repeating the above steps. Is there a posiibility to get root access to the current running pod?
– sudhir
Nov 22 '18 at 15:40
Hi I have already setup jenkins and configurations are made on same pod. Could you let me know if i can have root access to my present pod instead of repeating the above steps. Is there a posiibility to get root access to the current running pod?
– sudhir
Nov 22 '18 at 15:40
@sudbir Yes, you can get root permission as granting anyuid to jenkins service account. “oc adm policy add-scc-to-user anyuid -z jenkins”, refer Enable Container Images that Require Root for more details.
– Daein Park
Nov 22 '18 at 22:58
@sudbir Yes, you can get root permission as granting anyuid to jenkins service account. “oc adm policy add-scc-to-user anyuid -z jenkins”, refer Enable Container Images that Require Root for more details.
– Daein Park
Nov 22 '18 at 22:58
Hi I have used that command “oc adm policy add-scc-to-user anyuid -z jenkins” and logged in through putty with "oc rsh <jenkins pod>. but still when i install a package "yum install libgconf2-4" it gives below error. sh-4.2$ yum install libgconf2-4 Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager [Errno 13] Permission denied: '/etc/pki/entitlement-host' ovl: Error while doing RPMdb copy-up: [Errno 13] Permission denied: '/var/lib/rpm/.dbenv.lock' You need to be root to perform this command. What am i missing here to enter the container as root user?
– sudhir
Nov 23 '18 at 6:54
Hi I have used that command “oc adm policy add-scc-to-user anyuid -z jenkins” and logged in through putty with "oc rsh <jenkins pod>. but still when i install a package "yum install libgconf2-4" it gives below error. sh-4.2$ yum install libgconf2-4 Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager [Errno 13] Permission denied: '/etc/pki/entitlement-host' ovl: Error while doing RPMdb copy-up: [Errno 13] Permission denied: '/var/lib/rpm/.dbenv.lock' You need to be root to perform this command. What am i missing here to enter the container as root user?
– sudhir
Nov 23 '18 at 6:54
Would you check the uid using
id
cmd after oc rsh <jenkins pod>
? You should restart the pod after oc adm policy
cmd for changes. And libgconf2-4
package is not existing in RHEL repositories, is it correct name ?– Daein Park
Nov 23 '18 at 13:02
Would you check the uid using
id
cmd after oc rsh <jenkins pod>
? You should restart the pod after oc adm policy
cmd for changes. And libgconf2-4
package is not existing in RHEL repositories, is it correct name ?– Daein Park
Nov 23 '18 at 13:02
when i do oc rsh <jenkinspod> it gives sh-4.2$ id uid=1000130000(default) gid=0(root) groups=0(root),2001,1000130000 Iam looking on how to restart pod as well. Could u let me the command where i can restart that particularpod only.
– sudhir
Nov 27 '18 at 6:12
when i do oc rsh <jenkinspod> it gives sh-4.2$ id uid=1000130000(default) gid=0(root) groups=0(root),2001,1000130000 Iam looking on how to restart pod as well. Could u let me the command where i can restart that particularpod only.
– sudhir
Nov 27 '18 at 6:12
|
show 3 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53408296%2fopenshift-container-as-root-user%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown