contrail-installer icon indicating copy to clipboard operation
contrail-installer copied to clipboard

contrail.sh build fails on Ubuntu 16.04

Open stevedavistxus opened this issue 7 years ago • 6 comments

contrail@contrail:~/contrail-installer$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.3 LTS Release: 16.04 Codename: xenial contrail@contrail:~/contrail-installer$ ./contrail.sh build contrail.sh log /home/contrail/contrail-installer/log/contrail.log.2017-08-07-125622 2017-08-07 12:56:22 ++ echo_summary 'contrail.sh log /home/contrail/contrail-installer/log/contrail.log.2017-08-07-125622' 2017-08-07 12:56:22 ++ echo -e contrail.sh log /home/contrail/contrail-installer/log/contrail.log.2017-08-07-125622 2017-08-07 12:56:22 ++ ln -sf /home/contrail/contrail-installer/log/contrail.log.2017-08-07-125622 /home/contrail/contrail-installer/log/contrail.log 2017-08-07 12:56:22 ++ ln -sf /home/contrail/contrail-installer/log/contrail.log.2017-08-07-125622.2017-08-07-125622.summary /home/contrail/contrail-installer/log/contrail.log.summary 2017-08-07 12:56:22 ++ trap clean EXIT 2017-08-07 12:56:22 ++ trap interrupt SIGINT 2017-08-07 12:56:22 +++ read_stage 2017-08-07 12:56:22 +++ [[ -f /home/contrail/contrail-installer/.stage.txt ]] 2017-08-07 12:56:22 +++ echo nofile 2017-08-07 12:56:22 +++ return 2017-08-07 12:56:22 ++ [[ nofile == \n\o\f\i\l\e ]] 2017-08-07 12:56:22 ++ write_stage started 2017-08-07 12:56:22 ++ echo started 2017-08-07 12:56:22 ++ OPTION=build 2017-08-07 12:56:22 ++ ARGS_COUNT=1 2017-08-07 12:56:22 ++ setup_root_access 2017-08-07 12:56:22 ++ is_package_installed sudo 2017-08-07 12:56:22 ++ [[ -z sudo ]] 2017-08-07 12:56:22 ++ [[ -z deb ]] 2017-08-07 12:56:22 ++ [[ deb = \d\e\b ]] 2017-08-07 12:56:22 ++ dpkg -s sudo 2017-08-07 12:56:22 ++ sudo grep -q '^#includedir./etc/sudoers.d' /etc/sudoers 2017-08-07 12:56:22 +++ mktemp 2017-08-07 12:56:22 ++ TEMPFILE=/tmp/tmp.LVLeQsvEhy 2017-08-07 12:56:22 ++ echo 'contrail ALL=(root) NOPASSWD:ALL' 2017-08-07 12:56:22 ++ echo 'Defaults:contrail secure_path=/sbin:/usr/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin' 2017-08-07 12:56:22 ++ chmod 0440 /tmp/tmp.LVLeQsvEhy 2017-08-07 12:56:22 ++ sudo chown root:root /tmp/tmp.LVLeQsvEhy 2017-08-07 12:56:22 ++ sudo mv /tmp/tmp.LVLeQsvEhy /etc/sudoers.d/50_contrail_sh 2017-08-07 12:56:22 +++ hostname 2017-08-07 12:56:22 ++ grep -q contrail /etc/hosts 2017-08-07 12:56:22 +++ whoami 2017-08-07 12:56:22 ++ grep -q contrail /etc/hosts 2017-08-07 12:56:22 ++ generate_env -----------------------BUILD PHASE STARTED------------------------ 2017-08-07 12:56:22 +++ 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,kafka,alarm 2017-08-07 12:56:22 +++ tr -cd , 2017-08-07 12:56:22 +++ wc -c 2017-08-07 12:56:22 ++ local srvcnt=19 2017-08-07 12:56:22 ++ srvcnt=20 2017-08-07 12:56:22 ++ echo NUM_ENABLED_SERVICES=20 2017-08-07 12:56:22 ++ is_fedora 2017-08-07 12:56:22 ++ [[ -z Ubuntu ]] 2017-08-07 12:56:22 ++ '[' Ubuntu = Fedora ']' 2017-08-07 12:56:22 ++ '[' Ubuntu = 'Red Hat' ']' 2017-08-07 12:56:22 ++ '[' Ubuntu = CentOS ']' 2017-08-07 12:56:22 ++ '[' 1 -eq 0 ']' 2017-08-07 12:56:22 ++ '[' 1 -eq 1 ']' 2017-08-07 12:56:22 ++ '[' build == install ']' 2017-08-07 12:56:22 ++ '[' build == start ']' 2017-08-07 12:56:22 ++ '[' build == configure ']' 2017-08-07 12:56:22 Downloading dependencies 2017-08-07 12:56:22 ++ '[' build == clean ']' 2017-08-07 12:56:22 ++ '[' build == stop ']' 2017-08-07 12:56:22 ++ '[' build == build ']' 2017-08-07 12:56:22 ++ build_contrail 2017-08-07 12:56:22 ++ echo_summary '-----------------------BUILD PHASE STARTED------------------------' 2017-08-07 12:56:22 ++ echo -e -----------------------BUILD PHASE STARTED------------------------ 2017-08-07 12:56:22 ++ validstage_atoption build 2017-08-07 12:56:22 ++ local declare option=build 2017-08-07 12:56:22 ++ local declare ret_val=1 2017-08-07 12:56:22 +++ read_stage 2017-08-07 12:56:22 +++ [[ -f /home/contrail/contrail-installer/.stage.txt ]] 2017-08-07 12:56:22 +++ read line 2017-08-07 12:56:22 +++ echo started 2017-08-07 12:56:22 +++ return 2017-08-07 12:56:22 ++ local declare current_stage=started 2017-08-07 12:56:22 ++ [[ -z build ]] 2017-08-07 12:56:22 ++ '[' build == build ']' 2017-08-07 12:56:22 ++ '[' started == started ']' 2017-08-07 12:56:22 ++ ret_val=0 2017-08-07 12:56:22 ++ '[' build == install ']' 2017-08-07 12:56:22 ++ '[' build == configure ']' 2017-08-07 12:56:22 ++ '[' build == start ']' 2017-08-07 12:56:22 ++ '[' build == stop ']' 2017-08-07 12:56:22 ++ '[' build == clean ']' 2017-08-07 12:56:22 ++ return 0 2017-08-07 12:56:22 ++ [[ 0 -eq 1 ]] 2017-08-07 12:56:22 +++ id -u 2017-08-07 12:56:22 ++ C_UID=1000 2017-08-07 12:56:22 +++ id -g 2017-08-07 12:56:22 ++ C_GUID=1000 2017-08-07 12:56:22 ++ sudo mkdir -p /var/log/contrail 2017-08-07 12:56:22 ++ sudo chown -R 1000: /var/log/contrail 2017-08-07 12:56:22 chown: invalid spec: '1000:' 2017-08-07 12:56:22 ++ sudo chmod -R 664 '/var/log/contrail/' 2017-08-07 12:56:22 chmod: cannot access '/var/log/contrail/*': No such file or directory 2017-08-07 12:56:22 +++ read_stage 2017-08-07 12:56:22 +++ [[ -f /home/contrail/contrail-installer/.stage.txt ]] 2017-08-07 12:56:22 +++ read line 2017-08-07 12:56:22 +++ echo started 2017-08-07 12:56:22 +++ return 2017-08-07 12:56:22 ++ [[ started == \s\t\a\r\t\e\d ]] 2017-08-07 12:56:22 ++ download_dependencies 2017-08-07 12:56:22 ++ echo 'Downloading dependencies' 2017-08-07 12:56:22 ++ is_ubuntu 2017-08-07 12:56:22 ++ [[ -z deb ]] 2017-08-07 12:56:22 ++ '[' deb = deb ']' 2017-08-07 12:56:22 ++ apt_get update 2017-08-07 12:56:22 ++ [[ '' = \T\r\u\e ]] 2017-08-07 12:56:22 ++ [[ -z update ]] 2017-08-07 12:56:22 ++ local sudo=sudo 2017-08-07 12:56:22 +++ id -u 2017-08-07 12:56:22 ++ [[ 1000 = \0 ]] 2017-08-07 12:56:22 ++ sudo DEBIAN_FRONTEND=noninteractive http_proxy= https_proxy= no_proxy= apt-get --option Dpkg::Options::=--force-confold --force-yes --assume-yes update 2017-08-07 12:56:22 Hit:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease 2017-08-07 12:56:23 Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB] 2017-08-07 12:56:23 Get:3 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB] 2017-08-07 12:56:23 Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB] 2017-08-07 12:56:23 Fetched 306 kB in 0s (410 kB/s) 2017-08-07 12:56:24 Reading package lists... 2017-08-07 12:56:24 ++ return_status=0 2017-08-07 12:56:24 ++ [[ 0 -gt 0 ]] 2017-08-07 12:56:24 ++ apt_get install python-setuptools 2017-08-07 12:56:24 ++ [[ '' = \T\r\u\e ]] 2017-08-07 12:56:24 ++ [[ -z install python-setuptools ]] 2017-08-07 12:56:24 ++ local sudo=sudo 2017-08-07 12:56:24 +++ id -u 2017-08-07 12:56:24 ++ [[ 1000 = \0 ]] 2017-08-07 12:56:24 ++ sudo DEBIAN_FRONTEND=noninteractive http_proxy= https_proxy= no_proxy= apt-get --option Dpkg::Options::=--force-confold --force-yes --assume-yes install python-setuptools 2017-08-07 12:56:24 Reading package lists... 2017-08-07 12:56:25 Building dependency tree... 2017-08-07 12:56:25 Reading state information... 2017-08-07 12:56:25 python-setuptools is already the newest version (20.7.0-1). 2017-08-07 12:56:25 ++ return_status=0 2017-08-07 12:56:25 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. 2017-08-07 12:56:25 ++ [[ 0 -gt 0 ]] 2017-08-07 12:56:25 ++ apt_get install python-novaclient 2017-08-07 12:56:25 ++ [[ '' = \T\r\u\e ]] 2017-08-07 12:56:25 ++ [[ -z install python-novaclient ]] 2017-08-07 12:56:25 ++ local sudo=sudo 2017-08-07 12:56:25 +++ id -u 2017-08-07 12:56:25 ++ [[ 1000 = \0 ]] 2017-08-07 12:56:25 ++ sudo DEBIAN_FRONTEND=noninteractive http_proxy= https_proxy= no_proxy= apt-get --option Dpkg::Options::=--force-confold --force-yes --assume-yes install python-novaclient 2017-08-07 12:56:25 Reading package lists... 2017-08-07 12:56:25 Building dependency tree... 2017-08-07 12:56:25 Reading state information... 2017-08-07 12:56:25 python-novaclient is already the newest version (2:3.3.1-2ubuntu1). 2017-08-07 12:56:25 ++ return_status=0 2017-08-07 12:56:25 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. 2017-08-07 12:56:25 ++ [[ 0 -gt 0 ]] 2017-08-07 12:56:25 ++ apt_get install curl 2017-08-07 12:56:25 ++ [[ '' = \T\r\u\e ]] 2017-08-07 12:56:25 ++ [[ -z install curl ]] 2017-08-07 12:56:25 ++ local sudo=sudo 2017-08-07 12:56:25 +++ id -u 2017-08-07 12:56:25 ++ [[ 1000 = \0 ]] 2017-08-07 12:56:25 ++ sudo DEBIAN_FRONTEND=noninteractive http_proxy= https_proxy= no_proxy= apt-get --option Dpkg::Options::=--force-confold --force-yes --assume-yes install curl 2017-08-07 12:56:25 Reading package lists... 2017-08-07 12:56:25 Building dependency tree... 2017-08-07 12:56:25 Reading state information... 2017-08-07 12:56:25 curl is already the newest version (7.47.0-1ubuntu2.2). 2017-08-07 12:56:25 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. 2017-08-07 12:56:25 ++ return_status=0 2017-08-07 12:56:25 ++ [[ 0 -gt 0 ]] 2017-08-07 12:56:25 ++ [[ xenial != \t\r\u\s\t\y ]] 2017-08-07 12:56:25 ++ apt_get install chkconfig 2017-08-07 12:56:25 ++ [[ '' = \T\r\u\e ]] 2017-08-07 12:56:25 ++ [[ -z install chkconfig ]] 2017-08-07 12:56:25 ++ local sudo=sudo 2017-08-07 12:56:25 +++ id -u 2017-08-07 12:56:25 ++ [[ 1000 = \0 ]] 2017-08-07 12:56:25 ++ sudo DEBIAN_FRONTEND=noninteractive http_proxy= https_proxy= no_proxy= apt-get --option Dpkg::Options::=--force-confold --force-yes --assume-yes install chkconfig 2017-08-07 12:56:26 Reading package lists... 2017-08-07 12:56:26 Building dependency tree... 2017-08-07 12:56:26 Reading state information... 2017-08-07 12:56:26 Package chkconfig is not available, but is referred to by another package. 2017-08-07 12:56:26 This may mean that the package is missing, has been obsoleted, or contrail@contrail:~/contrail-installer$ 2017-08-07 12:56:26 E: Package 'chkconfig' has no installation candidate 2017-08-07 12:56:26 is only available from another source 2017-08-07 12:56:26 ++ return_status=100 2017-08-07 12:56:26 2017-08-07 12:56:26 Failure in installing package : install chkconfig 2017-08-07 12:56:26 ++ [[ 100 -gt 0 ]] 2017-08-07 12:56:26 exited with status :100 2017-08-07 12:56:26 ++ echo -e 'Failure in installing package : install' chkconfig 2017-08-07 12:56:26 ++ exit 100 2017-08-07 12:56:26 ++ clean 2017-08-07 12:56:26 ++ local r=100 2017-08-07 12:56:26 ++ echo 'exited with status :100' 2017-08-07 12:56:26 ++ exit 100 ^C contrail@contrail:~/contrail-installer$

stevedavistxus avatar Aug 07 '17 17:08 stevedavistxus

This issue was resolved using the suggest by ldurandadomia on Jun 8th under issue #139. However, another issue occurred later in the script:

/opt/stack/contrail/third_party/rapidjson not present exited with status :1

stevedavistxus avatar Aug 07 '17 18:08 stevedavistxus

I think it is because the network problem, rapidjson was not downloaded successfully. you can move to /opt/stack/contrail/thirt_party, all the third party packages are defined here in packages.xml. the download script is fetch_packages.py which located in the same directory.

Groundsea avatar Aug 08 '17 06:08 Groundsea

I've verified the path is correct in packages.xml and I don't see the mistake in fetch_packages.py. However looking at the error produced:

/opt/stack/contrail/third_party/rapidjson not present

There is no directory named rapidjson in /opt/stack/contrail/third_party

If I manually create the rapidjson directory in the above path and manually download rapidjson-v1.1.0.zip into that directory, then rm .stage.txt from my contrail-installer directory and rebuild using ./contrail.sh build - I am able to get past this error.

HOWEVER - yet another error is encountered!!

2017-08-08 09:09:23 scons: Reading SConscript files ... 2017-08-08 09:09:23 OSError: [Errno 17] File exists: 2017-08-08 09:09:23 File "/opt/stack/contrail/SConstruct", line 16: 2017-08-08 09:09:23 SConscript(dirs=['controller', 'vrouter', 'tools/sandesh']) 2017-08-08 09:09:23 File "/usr/lib/scons/SCons/Script/SConscript.py", line 614: 2017-08-08 09:09:23 return method(*args, **kw) 2017-08-08 09:09:23 File "/usr/lib/scons/SCons/Script/SConscript.py", line 551: 2017-08-08 09:09:23 return _SConscript(self.fs, *files, **subst_kw) contrail@contrail:~/contrail-installer$ 2017-08-08 09:09:23 File "/usr/lib/scons/SCons/Script/SConscript.py", line 260: 2017-08-08 09:09:23 exited with status :2 2017-08-08 09:09:23 exec _file_ in call_stack[-1].globals 2017-08-08 09:09:23 File "/opt/stack/contrail/controller/SConscript", line 5: 2017-08-08 09:09:23 SConscript(dirs=['lib', 'src']) 2017-08-08 09:09:23 File "/usr/lib/scons/SCons/Script/SConscript.py", line 614: 2017-08-08 09:09:23 return method(*args, **kw) 2017-08-08 09:09:23 File "/usr/lib/scons/SCons/Script/SConscript.py", line 551: 2017-08-08 09:09:23 return _SConscript(self.fs, *files, **subst_kw) 2017-08-08 09:09:23 File "/usr/lib/scons/SCons/Script/SConscript.py", line 260: 2017-08-08 09:09:23 exec _file_ in call_stack[-1].globals 2017-08-08 09:09:23 File "/opt/stack/contrail/controller/lib/SConscript", line 49: 2017-08-08 09:09:23 SConscript(dirs = dir, variant_dir = '#/build/third_party/' + dir) 2017-08-08 09:09:23 File "/usr/lib/scons/SCons/Script/SConscript.py", line 614: 2017-08-08 09:09:23 return method(*args, **kw) 2017-08-08 09:09:23 File "/usr/lib/scons/SCons/Script/SConscript.py", line 551: 2017-08-08 09:09:23 return _SConscript(self.fs, *files, **subst_kw) 2017-08-08 09:09:23 File "/usr/lib/scons/SCons/Script/SConscript.py", line 260: 2017-08-08 09:09:23 exec _file_ in call_stack[-1].globals 2017-08-08 09:09:23 File "/opt/stack/contrail/build/third_party/rapidjson/SConscript", line 21: 2017-08-08 09:09:23 [Dir(rapidjson_path + '/include/rapidjson')]) 2017-08-08 09:09:23 File "/opt/stack/contrail/build/third_party/rapidjson/SConscript", line 13: 2017-08-08 09:09:23 os.symlink(source[0].abspath, target[0].abspath) 2017-08-08 09:09:23 ++ ret_val=2 2017-08-08 09:09:23 ++ [[ 2 -ne 0 ]] 2017-08-08 09:09:23 ++ exit 2 2017-08-08 09:09:23 ++ clean 2017-08-08 09:09:23 ++ local r=2 2017-08-08 09:09:23 ++ echo 'exited with status :2' 2017-08-08 09:09:23 ++ exit 2

How is this working for everyone else? seems like I can't be the only one experiencing these issues.

stevedavistxus avatar Aug 08 '17 14:08 stevedavistxus

you can't just copy the zip file to rapidjson directory. script fetch_packages.py does a lot of things, first download file to /tmp directory, then unzip, rename the directory, cp to the third_party directory, all these operations are defined in packages.xml.

Groundsea avatar Aug 09 '17 02:08 Groundsea

The only thing I can find as a possible issue is the 4f82cc9f41b7d39afeeec10ff8b581b9 is different from the md5 checksum of the file if I download from the link and test use md5sum rapidjson-v1.1.0.zip

I changed it in packages.xml to match the checksum of the file I downloaded as a test but I still get the same error when I issue the ./contrail.sh build command.

Could we get a little help from the dell community to have a stable build on gethub for open contrail?

stevedavistxus avatar Aug 14 '17 14:08 stevedavistxus

Ran into the same problem, discovered that third_party/fetch_packages.py failed altogether due to missing dependencies. In my case, it was missing libtool.

abgzlnv avatar Jan 09 '18 13:01 abgzlnv