Issues with Cassandra, DNS resolution and access right on /opt/stack during stack building
ldurandadomia opened this issue · 4 comments
I'm facing some issue with OpenContrail building.
I'm using following setup :
Ubuntu 16.04 (4.4.0-79-generic kernel)
stable/ocata
local.conf file :
[[local|localrc]]
HOST_IP=192.168.37.194
SERVICE_HOST=$HOST_IP
MYSQL_HOST=$HOST_IP
RABBIT_HOST=$HOST_IP
GLANCE_HOSTPORT=$HOST_IP:9292
ADMIN_PASSWORD=contrail123
MYSQL_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
SERVICE_TOKEN=$ADMIN_PASSWORD
DATABASE_PASSWORD=$ADMIN_PASSWORD
GIT_BASE=${GIT_BASE:-https://git.openstack.org}
DEST=/opt/stack/openstack
CONTRAIL_DEST=/opt/stack/contrail
CONTRAIL_PATCHES="sed -i '/container/d' /opt/stack/contrail/controller/src/SConscript"
FORCE=yes
RECLONE=False
VERBOSE=True
LOGFILE=/opt/stack/openstack/logs/stack.sh.log
USE_SYSTEMD=False
USE_SCREEN=True
IP_VERSION=4
Q_USE_PROVIDERNET_FOR_PUBLIC=False
FIXED_RANGE="10.24.0.0/24"
NETWORK_GATEWAY="10.24.0.1"
disable_service dstat
disable_service tempest
enable_service placement_api
enable_plugin contrail https://github.com/zioc/contrail-devstack-plugin.git
disable_service ui-webs ui-jobs named dns query-engine
SCONS_JOBS=1
I'm facing with following issues :
1°) Cassandra "package"
ERROR :
2017-06-01 10:41:30.336 | dpkg: error processing package cassandra-cpp-driver (--install):
2017-06-01 10:41:30.336 | dpkg: error processing package cassandra-cpp-driver-dev (--install):
2017-06-01 10:41:30.430 | libuv_1.8.0-1_amd64.deb
SOLUTION :
$ wget http://downloads.datastax.com/cpp-driver/ubuntu/16.04/dependenices/libuv/v1.8.0/libuv_1.8.0-1_amd64.deb
$ sudo dpkg -i --force-overwrite libuv_1.8.0-1_amd64.deb
$ sudo apt-get install -f
2°) Access Right on /opt/stack
ERROR:
2017-06-08 15:00:30.288 | +functions-common:init_service_check:1451 mkdir -p /opt/stack/status/stack
2017-06-08 15:00:30.289 | mkdir: cannot create directory '/opt/stack/status': Permission denied
SOLUTION:
$ sudo chmod 777 /opt/stack
$ mkdir -p /opt/stack/status/stack
3°) When unstacking and restacking ... no more "dns" for URL resolution.
ERROR:
DNS is back after a reboot but is lost during built ....
I've discovered this is generated by migration of ens33 (my primary network interface) onto vhost0.
IP config is well moved but DNS setup is lost.
SOLUTION:
$ sudo vi /etc/resolv.conf
and I added this line :
nameserver 8.8.8.8
1°) @zioc works on a patch to build and install Cassandra CPP driver from source to leverage a dependency conflict with libuv for nodejs on 16.04. That should also fix your issue. But on my side I never met it. Did you have already install libuv on your system from the distrib packages?
2°) You have that devstack issue because you change the DEST directory which is not writable by the devstack's user. You change the /opt/stack
folder right before your run the script of use a folder in your user home.
3°) Are you using DHCP to set up the interface IP config?
The Contrail plugin only moves IP config (IP address and route) to the vrouter vhost0
interface. It does not change the resolv configuration. https://github.com/zioc/contrail-devstack-plugin/blob/master/devstack/plugin.sh#L114
Hello,
1°) Concerning Cassandra CPP, I'm using Ubuntu 16.04.2 fully updated (apt-get upgrade and dist-upgrade) 64 Bit - Desktop image :
http://releases.ubuntu.com/16.04/ubuntu-16.04.2-desktop-amd64.iso
libuv is not installed on my system before I'm running devstack :
$ sudo apt-cache policy libuv1
libuv1:
Installed: (none)
Candidate: 1.8.0-1
Version table:
1.8.0-1 500
500 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
2°) Yes, I'm creating /opt/stack directory with 777 access right on it before to build the stack in order to avoid this kind of issue.
$ sudo mkdir -p /opt/stack
$ sudo chmod 777 /opt/stack
3°) No, I'm fixing IP using network GUI manager. And this is probably the root cause of the issue.
In Ubuntu, DNS config is linked to interface .... and resolv.conf is fully managed by system scripts.
I've found following solution to get dns set globally on my server and to avoid to loose DNS resolution when contrail script is moving my interface configuration onto vhost0.
I'm creating following file 'tail' :
$ sudo vi /etc/resolvconf/resolv.conf.d/tail
Then I add following line :
nameserver 8.8.8.8
Then I'm rebuilding "resolv.conf" file with resolvconf tool :
$ sudo resolvconf --enable-updates
$ sudo resolvconf -u
1°) Ok. The only difference I see from my host is I use the server version of Ubuntu, not desktop. The dev
branch will resolve your issue.
2°) So that's not a Contrail devstack plugin issue but a devstack issue. We can close that one.
3°) Ok, as I use the server version, I don't have GUI and use DHCP client to provide IP and DNS configuration. With that configuration I don't have any DNS issue after an unstack
.
That fine for me. I'm working on multi-node setup, and I've faced with more issues.
I'll comment into #26