Juniper / contrail-installer

Install scripts for OpenContrail
29 stars 64 forks source link

Opencontrail installation failure in Ubuntu 16.04 #139

Open ACodingfreak opened 7 years ago

ACodingfreak commented 7 years ago

Issue seems to be because of chkconfig package not present. But Ubuntu 16.04 has no installation candidate for chkconfig package.

~/opencontrail/contrail-installer$ ./contrail.sh build
contrail.sh log /home/ip_test/opencontrail/contrail-installer/log/contrail.log.2016-11-05-084738
-----------------------BUILD PHASE STARTED------------------------
2016-11-05 08:47:41 ++ echo_summary 'contrail.sh log /home/ip_test/opencontrail/contrail-installer/log/contrail.log.2016-11-05-084738'
2016-11-05 08:47:41 ++ echo -e contrail.sh log /home/ip_test/opencontrail/contrail-installer/log/contrail.log.2016-11-05-084738
2016-11-05 08:47:41 ++ ln -sf /home/ip_test/opencontrail/contrail-installer/log/contrail.log.2016-11-05-084738 /home/ip_test/opencontrail/contrail-installer/log/contrail.log
2016-11-05 08:47:41 ++ ln -sf /home/ip_test/opencontrail/contrail-installer/log/contrail.log.2016-11-05-084738.2016-11-05-084738.summary /home/ip_test/opencontrail/contrail-installer/log/contrail.log.summary
2016-11-05 08:47:41 ++ trap clean EXIT
2016-11-05 08:47:41 ++ trap interrupt SIGINT
2016-11-05 08:47:41 +++ read_stage
2016-11-05 08:47:41 +++ [[ -f /home/ip_test/opencontrail/contrail-installer/.stage.txt ]]
2016-11-05 08:47:41 +++ read line
2016-11-05 08:47:41 +++ echo started
2016-11-05 08:47:41 +++ return
2016-11-05 08:47:41 ++ [[ started == \n\o\f\i\l\e ]]
2016-11-05 08:47:41 ++ OPTION=build
2016-11-05 08:47:41 ++ ARGS_COUNT=1
2016-11-05 08:47:41 ++ setup_root_access
2016-11-05 08:47:41 ++ is_package_installed sudo
2016-11-05 08:47:41 ++ [[ -z sudo ]]
2016-11-05 08:47:41 ++ [[ -z deb ]]
2016-11-05 08:47:41 ++ [[ deb = \d\e\b ]]
2016-11-05 08:47:41 ++ dpkg -s sudo
2016-11-05 08:47:41 ++ sudo grep -q '^#includedir.*/etc/sudoers.d' /etc/sudoers
2016-11-05 08:47:41 +++ mktemp
2016-11-05 08:47:41 ++ TEMPFILE=/tmp/tmp.q1yyGzP6io
2016-11-05 08:47:41 ++ echo 'ip_test ALL=(root) NOPASSWD:ALL'
2016-11-05 08:47:41 ++ echo 'Defaults:ip_test secure_path=/sbin:/usr/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin'
2016-11-05 08:47:41 ++ chmod 0440 /tmp/tmp.q1yyGzP6io
2016-11-05 08:47:41 ++ sudo chown root:root /tmp/tmp.q1yyGzP6io
2016-11-05 08:47:41 ++ sudo mv /tmp/tmp.q1yyGzP6io /etc/sudoers.d/50_contrail_sh
2016-11-05 08:47:41 +++ hostname
2016-11-05 08:47:41 ++ grep -q ip_test-KVM /etc/hosts
2016-11-05 08:47:41 +++ whoami
2016-11-05 08:47:41 ++ grep -q ip_test /etc/hosts
2016-11-05 08:47:41 ++ generate_env
2016-11-05 08:47:41 +++ echo named,dns,redis,cass,zk,ifmap,disco,apiSrv,schema,svc-mon,control,collector,analytics-api,query-engine,agent,redis-w,ui-jobs,ui-webs
2016-11-05 08:47:41 +++ tr -cd ,
2016-11-05 08:47:41 +++ wc -c
2016-11-05 08:47:41 ++ local srvcnt=17
2016-11-05 08:47:41 ++ srvcnt=18
2016-11-05 08:47:41 ++ echo NUM_ENABLED_SERVICES=18
2016-11-05 08:47:41 ++ is_fedora
2016-11-05 08:47:41 ++ [[ -z Ubuntu ]]
2016-11-05 08:47:41 ++ '[' Ubuntu = Fedora ']'
2016-11-05 08:47:41 ++ '[' Ubuntu = 'Red Hat' ']'
2016-11-05 08:47:41 ++ '[' Ubuntu = CentOS ']'
2016-11-05 08:47:41 ++ '[' 1 -eq 0 ']'
2016-11-05 08:47:41 ++ '[' 1 -eq 1 ']'
2016-11-05 08:47:41 ++ '[' build == install ']'
2016-11-05 08:47:41 ++ '[' build == start ']'
2016-11-05 08:47:41 ++ '[' build == configure ']'
2016-11-05 08:47:41 ++ '[' build == clean ']'
2016-11-05 08:47:41 ++ '[' build == stop ']'
2016-11-05 08:47:41 ++ '[' build == build ']'
2016-11-05 08:47:42 ++ build_contrail
2016-11-05 08:47:42 ++ echo_summary '-----------------------BUILD PHASE STARTED------------------------'
2016-11-05 08:47:42 ++ echo -e -----------------------BUILD PHASE STARTED------------------------
2016-11-05 08:47:42 ++ validstage_atoption build
2016-11-05 08:47:42 ++ local declare option=build
2016-11-05 08:47:42 ++ local declare ret_val=1
2016-11-05 08:47:42 +++ read_stage
2016-11-05 08:47:42 +++ [[ -f /home/ip_test/opencontrail/contrail-installer/.stage.txt ]]
2016-11-05 08:47:42 +++ read line
2016-11-05 08:47:42 +++ echo started
2016-11-05 08:47:42 +++ return
2016-11-05 08:47:42 ++ local declare current_stage=started
2016-11-05 08:47:42 ++ [[ -z build ]]
2016-11-05 08:47:42 ++ '[' build == build ']'
2016-11-05 08:47:42 ++ '[' started == started ']'
2016-11-05 08:47:42 ++ ret_val=0
2016-11-05 08:47:42 ++ '[' build == install ']'
2016-11-05 08:47:42 ++ '[' build == configure ']'
2016-11-05 08:47:42 ++ '[' build == start ']'
2016-11-05 08:47:42 ++ '[' build == stop ']'
2016-11-05 08:47:42 ++ '[' build == clean ']'
2016-11-05 08:47:42 ++ return 0
2016-11-05 08:47:42 ++ [[ 0 -eq 1 ]]
2016-11-05 08:47:42 +++ id -u
2016-11-05 08:47:42 ++ C_UID=1000
2016-11-05 08:47:42 +++ id -g
2016-11-05 08:47:42 ++ C_GUID=1000
2016-11-05 08:47:42 ++ sudo mkdir -p /var/log/contrail
2016-11-05 08:47:42 ++ sudo chown -R 1000: /var/log/contrail
2016-11-05 08:47:42 chown: invalid spec: '1000:'
2016-11-05 08:47:42 ++ sudo chmod -R 664 '/var/log/contrail/*'
2016-11-05 08:47:42 chmod: cannot access '/var/log/contrail/*': No such file or directory
2016-11-05 08:47:42 +++ read_stage
2016-11-05 08:47:42 +++ [[ -f /home/ip_test/opencontrail/contrail-installer/.stage.txt ]]
2016-11-05 08:47:42 +++ read line
2016-11-05 08:47:42 +++ echo started
2016-11-05 08:47:42 +++ return
2016-11-05 08:47:42 ++ [[ started == \s\t\a\r\t\e\d ]]
2016-11-05 08:47:42 ++ download_dependencies
2016-11-05 08:47:42 ++ echo 'Downloading dependencies'
2016-11-05 08:47:42 ++ is_ubuntu
2016-11-05 08:47:42 ++ [[ -z deb ]]
2016-11-05 08:47:42 ++ '[' deb = deb ']'
2016-11-05 08:47:42 ++ apt_get update
2016-11-05 08:47:42 ++ [[ '' = \T\r\u\e ]]
2016-11-05 08:47:42 ++ [[ -z update ]]
2016-11-05 08:47:42 ++ local sudo=sudo
2016-11-05 08:47:42 +++ id -u
2016-11-05 08:47:42 ++ [[ 1000 = \0 ]]
2016-11-05 08:47:42 ++ sudo DEBIAN_FRONTEND=noninteractive http_proxy= https_proxy= no_proxy= apt-get --option Dpkg::Options::=--force-confold --force-yes --assume-yes update
2016-11-05 08:47:42 ++ return_status=0
2016-11-05 08:47:42 ++ [[ 0 -gt 0 ]]
2016-11-05 08:47:42 ++ apt_get install python-setuptools
2016-11-05 08:47:42 ++ [[ '' = \T\r\u\e ]]
2016-11-05 08:47:42 ++ [[ -z install python-setuptools ]]
2016-11-05 08:47:42 ++ local sudo=sudo
2016-11-05 08:47:42 +++ id -u
2016-11-05 08:47:42 ++ [[ 1000 = \0 ]]
2016-11-05 08:47:42 ++ sudo DEBIAN_FRONTEND=noninteractive http_proxy= https_proxy= no_proxy= apt-get --option Dpkg::Options::=--force-confold --force-yes --assume-yes install python-setuptools
2016-11-05 08:47:42 ++ return_status=0
2016-11-05 08:47:42 ++ [[ 0 -gt 0 ]]
2016-11-05 08:47:42 ++ apt_get install python-novaclient
2016-11-05 08:47:42 ++ [[ '' = \T\r\u\e ]]
2016-11-05 08:47:42 ++ [[ -z install python-novaclient ]]
2016-11-05 08:47:42 ++ local sudo=sudo
2016-11-05 08:47:42 +++ id -u
2016-11-05 08:47:42 ++ [[ 1000 = \0 ]]
ip_test@ip_test-KVM:~/opencontrail/contrail-installer$ 2016-11-05 08:47:44 Downloading dependencies
2016-11-05 08:47:44 Hit:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease
2016-11-05 08:47:44 Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]
2016-11-05 08:47:44 Hit:3 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease
2016-11-05 08:47:44 Hit:4 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease
2016-11-05 08:47:44 Fetched 94.5 kB in 0s (109 kB/s)
2016-11-05 08:47:44 Reading package lists...
2016-11-05 08:47:44 Reading package lists...
2016-11-05 08:47:44 Building dependency tree...
2016-11-05 08:47:44 Reading state information...
2016-11-05 08:47:44 python-setuptools is already the newest version (20.7.0-1).
2016-11-05 08:47:44 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2016-11-05 08:47:44 Reading package lists...
2016-11-05 08:47:44 Building dependency tree...
2016-11-05 08:47:44 Reading state information...
2016-11-05 08:47:44 python-novaclient is already the newest version (2:3.3.1-2ubuntu1).
2016-11-05 08:47:44 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2016-11-05 08:47:44 Reading package lists...
2016-11-05 08:47:44 Building dependency tree...
2016-11-05 08:47:44 Reading state information...
2016-11-05 08:47:44 curl is already the newest version (7.47.0-1ubuntu2.2).
2016-11-05 08:47:44 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2016-11-05 08:47:44 Reading package lists...
2016-11-05 08:47:44 Building dependency tree...
2016-11-05 08:47:44 Reading state information...
2016-11-05 08:47:44 Package chkconfig is not available, but is referred to by another package.
2016-11-05 08:47:44 This may mean that the package is missing, has been obsoleted, or
2016-11-05 08:47:44 is only available from another source
2016-11-05 08:47:44 
2016-11-05 08:47:44 Failure in installing package : install chkconfig
2016-11-05 08:47:44 exited with status :100
2016-11-05 08:47:44 ++ sudo DEBIAN_FRONTEND=noninteractive http_proxy= https_proxy= no_proxy= apt-get --option Dpkg::Options::=--force-confold --force-yes --assume-yes install python-novaclient
2016-11-05 08:47:44 ++ return_status=0
2016-11-05 08:47:44 ++ [[ 0 -gt 0 ]]
2016-11-05 08:47:44 ++ apt_get install curl
2016-11-05 08:47:44 ++ [[ '' = \T\r\u\e ]]
2016-11-05 08:47:44 ++ [[ -z install curl ]]
2016-11-05 08:47:44 ++ local sudo=sudo
2016-11-05 08:47:44 +++ id -u
2016-11-05 08:47:44 ++ [[ 1000 = \0 ]]
2016-11-05 08:47:44 ++ sudo DEBIAN_FRONTEND=noninteractive http_proxy= https_proxy= no_proxy= apt-get --option Dpkg::Options::=--force-confold --force-yes --assume-yes install curl
2016-11-05 08:47:44 ++ return_status=0
2016-11-05 08:47:44 ++ [[ 0 -gt 0 ]]
2016-11-05 08:47:44 ++ [[ xenial != \t\r\u\s\t\y ]]
2016-11-05 08:47:44 ++ apt_get install chkconfig
2016-11-05 08:47:44 ++ [[ '' = \T\r\u\e ]]
2016-11-05 08:47:44 ++ [[ -z install chkconfig ]]
2016-11-05 08:47:44 ++ local sudo=sudo
2016-11-05 08:47:44 +++ id -u
2016-11-05 08:47:44 ++ [[ 1000 = \0 ]]
2016-11-05 08:47:44 ++ sudo DEBIAN_FRONTEND=noninteractive http_proxy= https_proxy= no_proxy= apt-get --option Dpkg::Options::=--force-confold --force-yes --assume-yes install chkconfig
2016-11-05 08:47:44 E: Package 'chkconfig' has no installation candidate
2016-11-05 08:47:44 ++ return_status=100
2016-11-05 08:47:44 ++ [[ 100 -gt 0 ]]
2016-11-05 08:47:44 ++ echo -e 'Failure in installing package : install' chkconfig
2016-11-05 08:47:44 ++ exit 100
2016-11-05 08:47:44 ++ clean
2016-11-05 08:47:44 ++ local r=100
2016-11-05 08:47:44 ++ echo 'exited with status :100'
2016-11-05 08:47:44 ++ exit 100
RTDevo commented 7 years ago

hello @ajithadapa , I have the same problem in ùy opencontrail installation. How did you fix it please ? In case, you had resolve it ?!

Thanks

ldurandadomia commented 7 years ago

Hello,

I'm facing the same issue.

Best regards.

ldurandadomia commented 7 years ago

Hello,

I've solved this dependency (chkconfig package is missing into Ubuntu 16.04) issue. Two files in ~/contrail-installer folder are taking care of this issue for Ubuntu 14.04 (trusty) release but not for xenial release.

Into files contrail_config_functions and contrail.sh You have to replace : if [[ "$DISTRO" != "trusty" ]]; then With if [[ "$DISTRO" != "xenial" ]]; then

After this change I have 2 lines in each file with "xenial" instead of "trusty" : $ grep xenial * contrail_config_functions: if [[ "$DISTRO" != "xenial" ]]; then contrail_config_functions: if [[ "$DISTRO" != "xenial" ]]; then contrail.sh: if [[ "$DISTRO" != "xenial" ]]; then contrail.sh: if [[ ${DISTRO} =~ (xenial) ]]; then

Then building is starting ....

Anyway my built is unsuccessful due to another issue : 2017-06-08 04:30:21 scons: *** Do not know how to make File target `controller/src/container/cni/bin/kube_cni' (/opt/stack/contrail/build/production/container/cni/bin/kube_cni). Stop. 2017-06-08 04:30:21 Writing cni-0.1.dev0/setup.cfg 2017-06-08 04:30:21 Creating tar archive 2017-06-08 04:30:21 removing 'cni-0.1.dev0' (and everything under it) 2017-06-08 04:30:21 scons: building terminated because of errors. 2017-06-08 04:30:22 ++ ret_val=2

Best regards.