I installed openstack magnum (ocata release) on docker in my controller node because I have installed newton on my host machines and newton binaries did not install correctly but now when I try to run magnum-service list command the output is:
ERROR: Unable to establish connection to http://controller:9511/v1/mservices
then I checked both magnum-api and magnum-conductor logs and there was an error:
ERROR magnum ImportError: No module named profiler
then I tried:
su -s /bin/sh -c "/var/lib/magnum/env/bin/pip install profiler" magnum
but even after installing profiler the error was the same.
Can anyone help?
Tnx to #eandersson now both services are running successfully but I faced another problem and that is when I try to run:
magnum service-list
The result is:
ERROR: 'errors'
So I tried:
magnum --debug service-list
And the result was:
ERROR: 'NoneType' object has no attribute 'replace' (HTTP 500) (Request-ID: req-cbe3a389-1cea-49f6-8472-3275696a67e3)
You are probably missing osprofiler, not profiler
profiler = importutils.try_import("osprofiler.profiler")
profiler_initializer = importutils.try_import("osprofiler.initializer")
profiler_web = importutils.try_import("osprofiler.web")
Try installing it instead.
su -s /bin/sh -c "/var/lib/magnum/env/bin/pip install osprofiler" magnum
By the way, when pip installing something for OpenStack you should be applying the requirements constrains.
-c https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata
So ideally your command would look like this.
su -s /bin/sh -c "/var/lib/magnum/env/bin/pip install -c https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata osprofiler" magnum
Related
I am trying to set up a Docker image (my Dockerfile is available here, sorry for the french README: https://framagit.org/Gwendal/firefox-icedtea-docker) with an old version of Firefox and an old version of Java to run an old Java applet to start a VPN. My image does work and successfully allows me to start the Java applet in Firefox.
Unfortunately, the said applet then tries to run the following command in the container (I've simply removed the --config part from the command as it does not matter here):
INFO: launching '/usr/bin/pkexec sh -c /usr/sbin/openvpn --config ...'
Then the applet exits silently with an error. While investigating, I've tried running a command with pkexec with the same Docker image, and it gives me this result:
$ sudo docker-compose run firefox pkexec /firefox/firefox-sdk/bin/firefox-bin -new-instance
**
ERROR:pkexec.c:719:main: assertion failed: (polkit_unix_process_get_start_time (POLKIT_UNIX_PROCESS (subject)) > 0)
But I don't know polkit at all and cannot understand this error.
EDIT: A more minimal way to reproduce the problem is with this Dockerfile:
FROM ubuntu:16.04
RUN apt-get update \
&& apt-get install -y policykit-1
And then run:
$ sudo docker build -t pkexec-test .
$ sudo docker run pkexec-test pkexec echo Hello
Which leads here again to:
ERROR:pkexec.c:719:main: assertion failed: (polkit_unix_process_get_start_time (POLKIT_UNIX_PROCESS (subject)) > 0)
Should I conclude that pkexec cannot work in a docker container? Or is there any way to make this command work?
Sidenote: I have no control whatsoever on the Java applet that I try to run, it is a horrible and very dated proprietary black box that I am supposed to use at work, for which I have no access to the source code, and that I must use as is.
I have solved my own problem by replacing pkexec by sudo in the docker image, and by allowing passwordless sudo.
Given an ubuntu docker image where a user called developer was created and configured with a USER statement, add these lines:
# Install sudo and make 'developer' a passwordless sudoer
RUN apt-get install sudo
ADD ./developersudo /etc/sudoers.d/developersudo
# Replacing pkexec by sudo
RUN rm /usr/bin/pkexec
RUN ln -s /usr/bin/sudo /usr/bin/pkexec
with the file developersudo containing:
developer ALL=(ALL) NOPASSWD:ALL
This replaces any call to pkexec made in a process running in the container, by a call to sudo without any password prompt, which works nicely.
After installing docker successfully, and installing taskCat using docker,
$ curl -s https://raw.githubusercontent.com/aws-quickstart/taskcat/master/installer/docker-installer.sh | sh
When i run the below command
$ taskcat -c /ci/taskcat.yml
I get an error
"bash: taskcat: command not found"
Do a whereis taskcat, or use the find command or locate command to find the install location of the taskcat command.
The path variable for taskcat has not been setup, that maybe a reason why it says command not found.
Some commands get installed in the homedirectory/bin folder, this path is not included by default in the PATH variable.
You can do export PATH=$PATH:/home/myuserdir/bin to solve this issue.
I currently have similar images being built for virtualbox and digital ocean for dev and production (they're using packer and ansible to build). They're using Ubuntu 14.04.
I've created a docker version from the same scripts without any issue. This is going to be for a Gitlab CI environment.
When I come to install packages inside a container I get an error. Potentially to do with broken init systems? Something not running?
My initial command is /sbin/init and I've tried with and without phusion/base-image.
The error is msg: '/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" install 'docker-engine'' failed: invoke-rc.d: unknown initscript, /etc/init.d/cgroup-lite not found.
dpkg: error processing package cgroup-lite (--configure):
(Yes, this is going to be a monolithic container rather than single-process and yes, I'm running docker from inside it - I'll be sharing docker.sock to make this work.)
So, I had a look at the code for invoke-rd.d and found this relevant snippet.
# If we're running on upstart and there's an upstart job of this name, do
# the rest with upstart instead of calling the init script.
if which initctl >/dev/null && initctl version | grep -q upstart \
&& [ -e "$UPSTARTDIR/${INITSCRIPTID}.conf" ]
then
is_upstart=1
elif test ! -f "${INITDPREFIX}${INITSCRIPTID}" ; then
## Verifies if the given initscript ID is known
## For sysvinit, this error is critical
printerror unknown initscript, ${INITDPREFIX}${INITSCRIPTID} not found.
if [ ! -e "$UPSTARTDIR/${INITSCRIPTID}.conf" ]; then
# If the init script doesn't exist, but the upstart job does, we
# defer the error exit; we might be running in a chroot and
# policy-rc.d might say not to start the job anyway, in which case
# we don't want to exit non-zero.
exit 100
fi
fi
A combination of docker replacing the init system, the inability to use upstart in an ubuntu docker container and the ubuntu package for cgroup-lite being built for upstart meant dpkg --configure was failing as the service couldn't be started.
I tried to install DC/OS cluster on my Mac by dcos-vagrant.
Intsallation is quite smooth, no errors found.
==> m1: sudo: chmod u+x /opt/mesosphere/bin/postflight.sh
==> m1: sudo: /opt/mesosphere/bin/postflight.sh
==> boot: DC/OS Installation Complete
==> boot: Web Interface: http://m1.dcos/
but when I opne the http://m1.dcos/, doesn't show the web-ui, show the ERR_EMPTY_RESPONSE error, and cannot find the dcos command.
GET http://m1.dcos/ net::ERR_EMPTY_RESPONSE
➜ dcos-vagrant git:(master) dcos marathon app add https://dcos.io/docs/1.7/usage/nginx.json
zsh: command not found: dcos
Anyone can help me! Thanks in advance!
dcos cannot work duo to I didn't install the dcos CLI.
intallation DC/OS CLI
To install the CLI, copy and paste into your terminal:
mkdir -p dcos
cd dcos
curl -O https://downloads.dcos.io/dcos-cli/install.sh
bash ./install.sh . https://m1.dcos
source ./bin/env-setup
Empty response from http://m1.dcos/ would seem to indicate the UI service or admin router is having issues, but the CLI working means admin router is reachable and correctly proxying components like Marathon & Mesos.
You might check the admin router logs to see if it's having trouble serving the UI html/js.
Status:
systemctl status dcos-adminrouter.service
Logs:
journalctl -u dcos-adminrouter
i got problem here. I try to install TL-WN725N by refering to http://blog.pi3g.com/2013/05/tp-link-tl-wn725n-nano-wifi-adapter-v2-0-raspberry-pi-driver/ web
then, when doing this command
sudo modprobe 8188eu
the error is appear like this:
ERROR: could not insert '8188eu': Exec format error
anyone please advice. Thanks
1. uname -r //gives ur rp version number
2. Based on the rp version number choose ur 8188eu tar file from http://www.raspberrypi.org/forums/viewtopic.php?p=462982#p462982
3. wget https://dl.dropboxusercontent.com/u/80256631/8188eu-201xyyzz.tar.gz
4. tar -zxvf 8188eu-201*.tar.gz
5. sudo cp rtl8188eufw.bin /lib/firmware/rtlwifi //not needed anymore if your operating system is above 3.10.33+
6. sudo install -p -m 644 8188eu.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless
7. sudo insmod /lib/modules/3.10.33+/kernel/drivers/net/wireless/8188eu.ko
8. sudo depmod -a
9. sudo reboot
Refer my blog as well