pycadf error while installing devstack kilo in ubuntu - openstack

/usr/local/bin/keystone-manage db_sync
Traceback (most recent call last):
File "/usr/local/bin/keystone-manage", line 4, in
import('pkg_resources').require('keystone==2015.1.3.dev15')
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py", line 3138, in
#_call_aside
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py", line 3124, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py", line 3151, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py", line 663, in _build_master
return cls._build_from_requirements(requires)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py", line 676, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py", line 849, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pycadf<0.9.0,>=0.8.0' distribution was not found and is required by keystone
exit_trap
local r=1
++ jobs -p
jobs=
[[ -n '' ]]
kill_spinner
'[' '!' -z '' ']'
[[ 1 -ne 0 ]]
echo 'Error on exit'
Error on exit
[[ -z /opt/stack/logs ]]
/home/stack/devstack/tools/worlddump.py -d /opt/stack/logs
World dumping... see /opt/stack/logs/worlddump-2016-01-08-084638.txt for details
exit 1
Log file: https://gist.github.com/anonymous/da3e29e34781fb2afc05

Even I was facing the same issue while running devstack. Looks like the pycadf lib is required for keystone.
I just had to install it: sudo pip install python-pycadf==0.6.0
and it worked for me.
Hope it works for you as well! Thanks.

Related

gcloud installation issues in cloudera VM

I am trying to configure gcloud sdk in cloudera VM. Below commands I have used. I have tried to pass python a default parameter in install.sh but stil not working out. Can some one guide me any clean approach.
curl https://sdk.cloud.google.com | bash
1. I have installed python3.7 on the top of existing 2.6
(base) [cloudera#quickstart google-cloud-sdk]$ which python
alias python='/home/cloudera/anaconda3/bin'
(base) [cloudera#quickstart google-cloud-sdk]$ whereis python
python: /usr/bin/python2.6 /usr/bin/python /usr/bin/python2.6-config /usr/lib/python2.6 /usr/lib64/python2.6 /usr/include/python2.6 /usr/share/man/man1/python.1.gz
(base) [cloudera#quickstart google-cloud-sdk]$
2. Error Log from sh -x install.sh
+ _cloudsdk_which python2
+ which python2
+ CLOUDSDK_PYTHON=python2
+ unset PYTHONHOME
+ case :$CLOUDSDK_PYTHON_SITEPACKAGES:$VIRTUAL_ENV: in
+ case " $CLOUDSDK_PYTHON_ARGS " in
+ CLOUDSDK_PYTHON_ARGS=-S
+ unset CLOUDSDK_PYTHON_SITEPACKAGES
+ export CLOUDSDK_ROOT_DIR CLOUDSDK_PYTHON_ARGS
+ '[' -z python2 ']'
++ id -u
+ '[' 501 = 0 ']'
+ python2 -S /home/cloudera/google-cloud-sdk/bin/bootstrapping/install.py
Traceback (most recent call last):
File "/home/cloudera/google-cloud-sdk/bin/bootstrapping/install.py", line 12, in <module>
import bootstrapping
File "/home/cloudera/google-cloud-sdk/bin/bootstrapping/bootstrapping.py", line 32, in <module>
import setup # pylint:disable=g-import-not-at-top
File "/home/cloudera/google-cloud-sdk/bin/bootstrapping/setup.py", line 55, in <module>
from googlecloudsdk.core import properties
File "/home/cloudera/google-cloud-sdk/lib/googlecloudsdk/core/properties.py", line 378
self.__sections = {section.name: section for section in sections}
^
3. After hardcoding the python as default.
+ echo Welcome to the Google Cloud 'SDK!'
Welcome to the Google Cloud SDK!
++ _cloudsdk_root_dir install.sh
++ case $1 in
+++ _cloudsdk_which install.sh
+++ which install.sh
+++ command -v install.sh
++ _cloudsdk_path=
++ case $_cloudsdk_path in
++ _cloudsdk_path=/home/cloudera/google-cloud-sdk/
++ _cloudsdk_dir=0
++ :
+++ readlink /home/cloudera/google-cloud-sdk/
++ _cloudsdk_link=
++ case $_cloudsdk_dir in
++ '[' -d /home/cloudera/google-cloud-sdk/ ']'
++ break
++ :
++ case $_cloudsdk_path in
+++ dirname /home/cloudera/google-cloud-sdk//.
++ _cloudsdk_path=/home/cloudera/google-cloud-sdk
++ :
++ case $_cloudsdk_path in
++ echo /home/cloudera/google-cloud-sdk
++ break
+ CLOUDSDK_ROOT_DIR=/home/cloudera/google-cloud-sdk
+ '[' -z '' ']'
+ CLOUDSDK_PYTHON=python
+ unset PYTHONHOME
+ case :$CLOUDSDK_PYTHON_SITEPACKAGES:$VIRTUAL_ENV: in
+ case " $CLOUDSDK_PYTHON_ARGS " in
+ CLOUDSDK_PYTHON_ARGS=-S
+ unset CLOUDSDK_PYTHON_SITEPACKAGES
+ export CLOUDSDK_ROOT_DIR CLOUDSDK_PYTHON_ARGS
+ '[' -z python ']'
++ id -u
+ '[' 501 = 0 ']'
+ python -S /home/cloudera/google-cloud-sdk/bin/bootstrapping/install.py
Traceback (most recent call last):
File "/home/cloudera/google-cloud-sdk/bin/bootstrapping/install.py", line 27, in <module>
from googlecloudsdk import gcloud_main
File "/home/cloudera/google-cloud-sdk/lib/googlecloudsdk/gcloud_main.py", line 37, in <module>
from googlecloudsdk.command_lib.util.apis import yaml_command_translator
File "/home/cloudera/google-cloud-sdk/lib/googlecloudsdk/command_lib/util/apis/yaml_command_translator.py", line 241
if self.spec.async:
^
SyntaxError: invalid syntax
Gcloud SDK works on 2.7 version or later but not python3. I had to install 2.7 and below the steps i performed.
1. Get python2.7 for anaconda
2. Install and provide an alernative path like /home/cloudera/anaconda2/
3. bash Anaconda2-2019.03-Linux-x86_64.sh
4. Update .bash_profile (alias python2.7='/home/cloudera/anaconda2/bin/python2.7')
5. Update CLOUDSDK_PYTHON="python2.7" in /home/cloudera/google-cloud-sdk/install.sh (Need to put after the if loop)
6. Then execute sh -x install.sh
Thanks

Error during OpenStack installation: ./stack.sh:exit_trap:539 echo 'Error on exit'

I am new to OpenStack. While installing devstack on my VM, during the execution of
./stack.sh
using ubuntu 16.04, I am getting the following error:
+lib/etcd3:install_etcd3:121 echo ' /opt/stack/devstack/files/etcd-v3.1.7-linux-arm64.tar.gz'
+lib/etcd3:install_etcd3:123 sha256sum -c /opt/stack/devstack/files/etcd.sha256sum
sha256sum: /opt/stack/devstack/files/etcd.sha256sum: no properly formatted SHA256 checksum lines found
+lib/etcd3:install_etcd3:1 exit_trap
+./stack.sh:exit_trap:521 local r=1
++./stack.sh:exit_trap:522 jobs -p
+./stack.sh:exit_trap:522 jobs=
+./stack.sh:exit_trap:525 [[ -n '' ]]
+./stack.sh:exit_trap:531 '[' -f '' ']'
+./stack.sh:exit_trap:536 kill_spinner
+./stack.sh:kill_spinner:417 '[' '!' -z '' ']'
+./stack.sh:exit_trap:538 [[ 1 -ne 0 ]]
+./stack.sh:exit_trap:539 echo 'Error on exit'
Error on exit
+./stack.sh:exit_trap:540 generate-subunit 1517844452 85 fail
+./stack.sh:exit_trap:541 [[ -z /opt/stack/logs ]]
+./stack.sh:exit_trap:544 /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs
World dumping... see /opt/stack/logs/worlddump-2018-02-05-152857.txt for details
+./stack.sh:exit_trap:550 exit 1
I also check the worlddump file, but I didn't see nothing strange, for me.
I strictly follow the steps described in this guide: https://docs.openstack.org/devstack/latest/
Could the hardware on which I am working cause this error?
Any tips?
Thanks

Devstack installation fail at python update.py /opt/stack//cinder

i am new to openstack. while installing devstack on virtual box uisng ubuntu i am getting the following error. can any one help me to fix the problem. The error prompt is as follows.
cd /opt/stack/requirements
python update.py /opt/stack/cinder
Traceback (most recent call last):
File "update.py", line 505, in
main()
File "update.py", line 488, in main
options.hacking, stdout, options.verbose, non_std_reqs)
File "update.py", line 500, in _do_main
project, global_reqs, suffix, softupdate, hacking, non_std_reqs)
File "update.py", line 371, in _process_project
suffix, softupdate, hacking, project, global_reqs, non_std_reqs)
File "update.py", line 284, in _copy_requires
non_std_reqs)
File "update.py", line 255, in _sync_requirements_file
raise Exception("nonstandard requirement present.")
Exception: nonstandard requirement present.
+ exit_trap
+ local r=1
++ jobs -p
+ jobs=
+ [[ -n '' ]]
kill_spinner
'[' '!' -z '' ']'
[[ 1 -ne 0 ]]
echo 'Error on exit'
Error on exit
+ [[ -z /opt/stack/logs ]]
+ /home/faraz/devstack/tools/worlddump.py -d /opt/stack/logs
World dumping... see /opt/stack/logs/worlddump-2015-06-21-174507.txt for details
+ exit 1

Unix script giving error trying to assign variable?

I'm extremely new to Unix, and this is driving me crazy. I am getting this error:
./lines: line 21: [[: grep -c *.* $3: syntax error: operand expected
(error toke n is ".* $3")
./lines: line 26: [[: grep -c *.* $3: syntax error: operand expected
(error toke n is ".* $3")
When running this script:
#!/bin/bash
#lines <start> <finish> <file> prints lines start-finish of file
if [[ $# != 3 ]]
then echo "Command format: lines <starting line> <end line> <filename>"
exit
fi
tLines='grep -c *.* $3'
start=$1
finish=$2
if [[ $finish -lt $start ]]
then echo "$finish is less than $start. I'll go ahead and reverse those for you."
start=$2
finish=$1
fi
start=$((finish-start+1))
if [[ $tLines -lt $start ]]
then echo "$3 is only $tLines lines - that's less than $start"
exit
fi
if [[ $tLines -lt $finish ]]
then echo "3 is only $tLines line - that's less than $finish"
exit
fi
head -$finish $3 | tail -$start
exit
I have no idea what those errors mean and searching them online have not given me much insight. I appreciate any help!
Seems like you wanted to use command substitution here:
tLines='grep -c *.* $3'
But you used the wrong quotes. The correct ones are the legacy backticks:
tLines=`grep -c *.* $3`
Or the newer form:
tLines=$(grep -c *.* $3)

Unix troubleshooting, missing /etc/init.d file

I am working through this tutorial on daemonizing php scripts. When I run the following Unix command:
. /etc/init.d/functions
#startup values
log=/var/log/Daemon.log
#verify that the executable exists
test -x /home/godlikemouse/Daemon.php || exit 0RETVAL=0
prog="Daemon"
proc=/var/lock/subsys/Daemon
bin=/home/godlikemouse/Daemon.php
start() {
# Check if Daemon is already running
if [ ! -f $proc ]; then
echo -n $"Starting $prog: "
daemon $bin --log=$log
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $proc
echo
fi
return $RETVAL
}
I get the following output:
./Daemon: line 12: /etc/init.d/functions: No such file or directory
Starting Daemon: daemon: unrecognized option `--log=/var/log/Daemon.log'
I looked at my file system and there was no /etc/init.d file. Can anyone tell me what this is and where to obtain it? Also is the absence of that file what's causing the other error?
Separate your args within their own " " double-quotes:
args="--node $prog"
daemon "nohup ${exe}" "$args &" </dev/null 2>/dev/null
daemon "exe" "args"

Resources