errors while use ./stack.sh of devstack - openstack

I am new to openstack. As told that devstack is convinent to deploy openstack,I try to do that on ubuntu 14.04,but an error arose after ./stack.sh, the following is the error log:
screen -S stack -p g-api -X stuff '/usr/local/bin/glance-api --config-file=/etc/glance/glance-api.conf & echo $! >/opt/stack/status/stack/g-api.pid; fg || ech' "g-api failed to start" | tee "/opt/stack/status/stack/g-api.failure"
+ echo 'Waiting for g-api (114.212.132.122:9290) to start...'
Waiting for g-api (114.212.132.122:9290) to start...
+ wait_for_service 60 http://114.212.132.122:9290
+ local timeout=60
+ local url=http://114.212.132.122:9290
+ timeout 60 sh -c 'while ! curl -k --noproxy '\''*'\'' -s http://114.212.132.122:9290 >/dev/null; do sleep 1; done'
+ die 317 'g-api did not start'
+ local exitcode=0
+ set +o xtrace
[Call Trace]
./stack.sh:1181:start_glance
/home/stack/devstack/lib/glance:317:die
[ERROR] /home/stack/devstack/lib/glance:317 g-api did not start
Error on exit
Thanks for helping :)

Related

How do I apply nvprof to Kinetica?

Can someone pls gimme a hint on how to apply nvprof to Kinetica ?
1) I see the name of processes of Kinetica which sits upon GPUs is gpudb_cluster_cuda, and its parent process is gpudb_host_manager. I find gpudb_host_manager is started by /etc/rc.d/init.d/gpudb_host_manager.
2) Thus I modified it as below. This should work - even for its child processes. But it doesn't. No profiling data was produced for gpudb_cluster_cuda.
# vi /etc/rc.d/init.d/gpudb_host_manager
...
# $START_PROG"$GPUDB_EXE start-host-manager 2>&1 | tee -a ${STARTUP_LOG}; ( exit \${PIPESTATUS[0]} )"
$START_PROG"/usr/local/cuda-9.2/bin/nvprof --log-file /tmp/nvprof/%p.txt --export-profile /tmp/nvprof/%p.nvvp --print-gpu-trace --profile-child-processes $GPUDB_EXE start-host-manager 2>&1 | tee -a ${STARTUP_LOG}; ( exit \${PIPESTATUS[0]} )"
...
I applied nvprof to /etc/rc.d/init.d/gpudb, and it produces some traces but it does not use GPUs at all.
# vi /etc/rc.d/init.d/gpudb
...
# $START_PROG"$GPUDB_EXE start 2>&1 | tee -a ${STARTUP_LOG}; ( exit \${PIPESTATUS[0]} )"
$START_PROG"/usr/local/cuda-9.2/bin/nvprof --log-file /tmp/nvprof/%p.txt --export-profile /tmp/nvprof/%p.nvvp --print-gpu-trace --profile-child-processes $GPUDB_EXE start 2>&1 | tee -a ${STARTUP_LOG}; ( exit \${PIPESTATUS[0]} )"
...
Of course, I stopped and restarted these. Any comment would be welcome.
I found that nvprof can be applied by editing /opt/gpudb/core/bin/gpudb as below.
[root#localhost ~]# vi /opt/gpudb/core/bin/gpudb
...
# nohup $HOST_MANAGER_CMD >> $HOST_MANAGER_LOG_FILENAME 2>&1 &
nohup /usr/local/cuda-9.2/bin/nvprof --log-file /tmp/nvprof/%p.txt --export-profile /tmp/nvprof/%p.nvvp --print-gpu-trace --profile-child-processes $HOST_MANAGER_CMD >> $HOST_MANAGER_LOG_FILENAME 2>&1 &
...

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

How do I deploy a artifact with maven layout using REST API?

I can do a normal deploy using the below command
curl -i -X PUT -u $artifactoryUser:$artifactoryPassword -T /path/to/file/file.zip http://localhost/artifactory/simple/repo/groupId/artifactId/version/file.zip
However, this will not resolve or update maven layout on the artifact. Is there a way I can upload without using the artifactory-maven plugin?
I found a solution to this question I had posted.
Syntax Used:
curl -i -X PUT -K $CURLPWD "http://localhost/artifactory/$REPO/$groupId/$artifactId/$versionId/$artifactId-$versionId.$fileExt"
Ended up writing a script so that md5 & sha1 values are uploaded with the file, or else, I had to go in Artifactory and fix it manually.
#!/bin/bash
usage() {
echo "Please check the Usage of the Script, there were no enough parameters supplied."
echo "Usage: ArtifactoryUpload.sh localFilePath Repo GroupID ArtifactID VersionID"
exit 1
}
if [ -z "$5" ]; then
usage
fi
localFilePath="$1"
REPO="$2"
groupId="$3"
artifactId="$4"
versionId="$5"
ARTIFAC=http://localhost/artifactory
if [ ! -f "$localFilePath" ]; then
echo "ERROR: local file $localFilePath does not exists!"
exit 1
fi
which md5sum || exit $?
which sha1sum || exit $?
md5Value="`md5sum "$localFilePath"`"
md5Value="${md5Value:0:32}"
sha1Value="`sha1sum "$localFilePath"`"
sha1Value="${sha1Value:0:40}"
fileName="`basename "$localFilePath"`"
fileExt="${fileName##*.}"
echo $md5Value $sha1Value $localFilePath
echo "INFO: Uploading $localFilePath to $targetFolder/$fileName"
curl -i -X PUT -K $CURLPWD \
-H "X-Checksum-Md5: $md5Value" \
-H "X-Checksum-Sha1: $sha1Value" \
-T "$localFilePath" \
"$ARTIFAC/$REPO/$groupId/$artifactId/$versionId/$artifactId-$versionId.$fileExt"

'An error occurred when executing the "'cache:clear --no-warmup'" command' with capifony

I am trying to deploy with capifony, but when I run
$ cap deploy
It returns an error
--> Updating code base with remote_cache strategy
Password:
--> Creating cache directory................................✔
--> Creating symlinks for shared directories................✔
--> Creating symlinks for shared files......................✔
--> Normalizing asset timestamps............................✔
--> Updating Composer.......................................✔
--> Updating Composer dependencies..........................✘
*** [err :: som.info]
*** [err :: som.info] [RuntimeException]
*** [err :: som.info] An error occurred when executing the "'cache:clear --no-warmup'" command.
*** [err :: som.info] Exception trace:
*** [err :: som.info] () at /home/yamaken/som.info/shared/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Composer/ScriptHandler.php:182
*** [err :: som.info] Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::executeCommand() at /home/yamaken/som.info/shared/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Composer/ScriptHandler.php:62
.....
This is my deploy.rb
set :application, "sommelier"
set :domain, "som.info"
set :deploy_to, "/home/yamaken/#{domain}"
set :app_path, "app"
set :repository, "git#github.com:haji/sommelier.git"
set :scm, :git
set :default_shell, "TERM=dumb sudo -u yamaken /bin/sh"
set :branch, "master"
set :scm_username, "haji"
set :scm_passphrase, "********"
set :use_sudo, false
set :user, 'yamaken'
set :model_manager, "doctrine"
# Or: `propel`
role :web, domain # Your HTTP server, Apache/etc
role :app, domain, :primary => true # This may be the same as your `Web` server
set :keep_releases, 3
set :shared_files, ["app/config/parameters.yml"]
set :shared_children, [app_path + "/spool",app_path + "/logs", web_path + "/uploads","vendor"]
set :writable_dirs, ["app/cache", "app/logs","app/spool"]
set :permission_method, :chown #
set :use_set_permissions, false
I have tried the code according to #nifr suggestion.
$ _DEBUG=1 cap deploy
Ruby Version => 1.8.7-p358
OpenSSL::Version => OpenSSL 0.9.8y 5 Feb 2013
Net::SSH::Version::CURRENT => 2.6.8
Net::SSH -> Local platform => unix
Password:
Remote Whoami => yamaken
umask on Server => 0022
$SHELL => /bin/bash
$BASH_VERSION => 4.1.5(1)-release
Interactive Shell - Test: $PS1 => no
* 2013-12-04 11:45:36 executing `deploy'
* 2013-12-04 11:45:36 executing `deploy:update'
** transaction: start
* 2013-12-04 11:45:36 executing `deploy:update_code'
triggering before callbacks for `deploy:update_code'
--> Updating code base with checkout strategy
executing locally: "git ls-remote git#github.com:haji/sommelier.git master"
command finished in 2798ms
* executing "git clone -q -b master git#github.com:haji/sommelier.git /home/yamaken/som.info/releases/20131204024539 && cd /home/yamaken/som.info/releases/20131204024539 && git checkout -q -b deploy 1ab8525ef883da0826b6b3d08a1c98da1904edd2 && (echo 1ab8525ef883da0826b6b3d08a1c98da1904edd2 > /home/yamaken/som.info/releases/20131204024539/REVISION)"
servers: ["som.info"]
[som.info] executing command
command finished in 24263ms
* 2013-12-04 11:46:03 executing `deploy:finalize_update'
* executing "chmod -R g+w /home/yamaken/som.info/releases/20131204024539"
servers: ["som.info"]
[som.info] executing command
command finished in 556ms
--> Creating cache directory
* executing "sh -c 'if [ -d /home/yamaken/som.info/releases/20131204024539/app/cache ] ; then rm -rf /home/yamaken/som.info/releases/20131204024539/app/cache; fi'"
servers: ["som.info"]
[som.info] executing command
command finished in 374ms
* executing "sh -c 'mkdir -p /home/yamaken/som.info/releases/20131204024539/app/cache && chmod -R 0777 /home/yamaken/som.info/releases/20131204024539/app/cache'"
servers: ["som.info"]
[som.info] executing command
command finished in 383ms
* executing "chmod -R g+w /home/yamaken/som.info/releases/20131204024539/app/cache"
servers: ["som.info"]
[som.info] executing command
command finished in 365ms
* 2013-12-04 11:46:05 executing `deploy:share_childs'
--> Creating symlinks for shared directories
* executing "mkdir -p /home/yamaken/som.info/shared/app/spool"
servers: ["som.info"]
[som.info] executing command
command finished in 370ms
* executing "sh -c 'if [ -d /home/yamaken/som.info/releases/20131204024539/app/spool ] ; then rm -rf /home/yamaken/som.info/releases/20131204024539/app/spool; fi'"
servers: ["som.info"]
[som.info] executing command
command finished in 373ms
* executing "ln -nfs /home/yamaken/som.info/shared/app/spool /home/yamaken/som.info/releases/20131204024539/app/spool"
servers: ["som.info"]
[som.info] executing command
command finished in 372ms
* executing "mkdir -p /home/yamaken/som.info/shared/app/logs"
servers: ["som.info"]
[som.info] executing command
command finished in 369ms
* executing "sh -c 'if [ -d /home/yamaken/som.info/releases/20131204024539/app/logs ] ; then rm -rf /home/yamaken/som.info/releases/20131204024539/app/logs; fi'"
servers: ["som.info"]
[som.info] executing command
command finished in 366ms
* executing "ln -nfs /home/yamaken/som.info/shared/app/logs /home/yamaken/som.info/releases/20131204024539/app/logs"
servers: ["som.info"]
[som.info] executing command
command finished in 376ms
* executing "mkdir -p /home/yamaken/som.info/shared/web/uploads"
servers: ["som.info"]
[som.info] executing command
command finished in 373ms
* executing "sh -c 'if [ -d /home/yamaken/som.info/releases/20131204024539/web/uploads ] ; then rm -rf /home/yamaken/som.info/releases/20131204024539/web/uploads; fi'"
servers: ["som.info"]
[som.info] executing command
command finished in 401ms
* executing "ln -nfs /home/yamaken/som.info/shared/web/uploads /home/yamaken/som.info/releases/20131204024539/web/uploads"
servers: ["som.info"]
[som.info] executing command
command finished in 375ms
* executing "mkdir -p /home/yamaken/som.info/shared/vendor"
servers: ["som.info"]
[som.info] executing command
command finished in 375ms
* executing "sh -c 'if [ -d /home/yamaken/som.info/releases/20131204024539/vendor ] ; then rm -rf /home/yamaken/som.info/releases/20131204024539/vendor; fi'"
servers: ["som.info"]
[som.info] executing command
command finished in 969ms
* executing "ln -nfs /home/yamaken/som.info/shared/vendor /home/yamaken/som.info/releases/20131204024539/vendor"
servers: ["som.info"]
[som.info] executing command
command finished in 366ms
--> Creating symlinks for shared files
* executing "mkdir -p /home/yamaken/som.info/shared/app/config"
servers: ["som.info"]
[som.info] executing command
command finished in 366ms
* executing "touch /home/yamaken/som.info/shared/app/config/parameters.yml"
servers: ["som.info"]
[som.info] executing command
command finished in 378ms
* executing "ln -nfs /home/yamaken/som.info/shared/app/config/parameters.yml /home/yamaken/som.info/releases/20131204024539/app/config/parameters.yml"
servers: ["som.info"]
[som.info] executing command
command finished in 393ms
--> Normalizing asset timestamps
* executing "find /home/yamaken/som.info/releases/20131204024539/web/css /home/yamaken/som.info/releases/20131204024539/web/images /home/yamaken/som.info/releases/20131204024539/web/js -exec touch -t 201312040246.11 {} ';' &> /dev/null || true"
servers: ["som.info"]
[som.info] executing command
command finished in 383ms
triggering after callbacks for `deploy:finalize_update'
* 2013-12-04 11:46:12 executing `symfony:cache:warmup'
--> Warming up cache
* executing "sh -c 'cd /home/yamaken/som.info/releases/20131204024539 && php app/console cache:warmup --env=prod --no-debug'"
servers: ["som.info"]
[som.info] executing command
command finished in 530ms
*** [deploy:update_code] rolling back
* executing "rm -rf /home/yamaken/som.info/releases/20131204024539; true"
servers: ["som.info"]
[som.info] executing command
command finished in 536ms
failed: "TERM=dumb sudo -u yamaken /bin/sh -c 'sh -c '\\''cd /home/yamaken/som.info/releases/20131204024539 && php app/console cache:warmup --env=prod --no-debug'\\'''" on som.info
I have another quesion, there is the way for not doing the line below after deploy fails?
executing "rm -rf /home/yamaken/som.info/releases/20131204024539; true"
If I can remain the fils on the server. I can check the cause by manual operation.
Debugging Capistrano deployments:
A little trick i came up with to ease debugging is to use an environment variable to switch verbose output and some extra information on and off.
You can add something like this to your deploy.rb (extend or shorten if you like)...
unless ENV['_DEBUG'].nil?
puts "Ruby Version => #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"
puts "OpenSSL::Version => #{OpenSSL::OPENSSL_VERSION}"
puts "Net::SSH::Version::CURRENT => #{Net::SSH::Version::CURRENT}"
puts "Net::SSH -> Local platform => #{Net::SSH::Authentication::PLATFORM}"
puts "Remote Whoami => #{capture 'whoami'}"
puts "umask on Server => #{capture 'umask'}"
puts "$SHELL => #{capture 'echo $SHELL'}"
puts "$BASH_VERSION => #{capture 'echo $BASH_VERSION'}"
puts "Interactive Shell - Test: $PS1 => #{capture 'if [ -z "$PS1" ]; then echo no; else echo yes; fi'}"
logger.level = Logger::MAX_LEVEL
ssh_options[:verbose] = :debug
end
Now execute:
_DEBUG=1 cap deploy

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