Error in Glance_image[cirros] : change from absent to present failed: Command: ... has been running for more then 20 seconds - centos

I am running packstack.
Error: /Stage[main]/Main/Glance_image[cirros]/ensure: change from
absent to pres
ent failed: Command: 'openstack ["image", "create", "--format",
"shell", ["cirros", "--public", "--container-format=bare", "--disk-format=qcow2", "--copy-from=http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img"]]' has been running for more then 20 seconds!
I am having this error, I can wget it though, so I can perfectly reach it. Can someone help me resolving this? As a workaround I tried it manually, but I am really new to centos and Openstack, so I don't know much. I tried :
openstack image create --format shell cirros --public --container-format=bare --disk-format=qcow2 --copy-from=http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
I got Missing parameter(s):
Set a username with --os-username, OS_USERNAME, or auth.username Set
an authentication URL, with --os-auth-url, OS_AUTH_URL or
auth.auth_url Set a scope, such as a project or domain, set a project
scope with --os-project-
name, OS_PROJECT_NAME or auth.project_name, set a domain scope with
--os-domain-name, OS_DOMAIN_NAME or auth.domain_name
What should I add to the above command? Will it be able to solve my problem? If not what is the right way to solve the problem?

Solved it by replacing
--copy-from=http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img to point --copy-from=<local path>
But didn't got why the original command not working even when I can wget it.

Related

openfoam ./makeParaview

i am currently building openfoam 1912 from source and have some trouble building paraview. I just build Qt and Cmake but as soon as i type ./makeParaview qt-5.9.9 5.6.3i get the following error:
./makeParaView: 64: local: -DWM_DP: bad variable name
./makeParaView: 64: ./makeParaView: -DOPENFOAM: bad variable name
A similar error occurs when i try to make VTK / Adios2. Any idea where i took the wrong turn?
Greetings
Gabbagandalf
The proper solution is related to shell quoting issues
- flag="$(stripCompilerFlags $flag)"
+ flag="$(stripCompilerFlags "$flag")"
but in the meantime you can simply change the shebang to #!/bin/bash - it is more forgiving.
As discussed and resolved in these GitLab ticket-1 and ticket-2:
The issue seems to be Ubuntu related.
Solution:
Prior to execute ./makeParaview, switch to bash:
Change the first line of makeParaView script to #!/bin/bash
sudo dpkg-reconfigure dash
./makeParaView

Eclipse pluginCustomization

I would like to add default ssh connections to eclipse as global configuration (generic through workspaces). For that, im using -pluginCustomization runtime parameter. Here is my test.ini file:
org.eclipse.remote.core/connectionTypeId=org.eclipse.remote.JSch
org.eclipse.remote.core/connections/org.eclipse.remote.JSch/m3ulcb/JSCH_ADDRESS_ATTR=localhost
org.eclipse.remote.core/connections/org.eclipse.remote.JSch/m3ulcb/JSCH_IS_PASSWORD_ATTR=true
org.eclipse.remote.core/connections/org.eclipse.remote.JSch/m3ulcb/JSCH_LOGIN_SHELL_COMMAND_ATTR=/bin/bash -l -c '{0}'
org.eclipse.remote.core/connections/org.eclipse.remote.JSch/m3ulcb/JSCH_PORT_ATTR=22
org.eclipse.remote.core/connections/org.eclipse.remote.JSch/m3ulcb/JSCH_TIMEOUT_ATTR=0
org.eclipse.remote.core/connections/org.eclipse.remote.JSch/m3ulcb/JSCH_USERNAME_ATTR=foo
org.eclipse.remote.core/connections/org.eclipse.remote.JSch/m3ulcb/JSCH_USE_LOGIN_SHELL_ATTR=true
eclipse.preferences.version=1
I see that the connectionTypeId takes efect and my default connection goes to ssh. The rest just does not work.
Any help would be really appreciate.
Thanks!
PS: I'm an eclipse newbie

capistrano upload! thinks ~ referenced local directory is on remote server

So every example I've looked up indicates this is how one is supposed to do it but I think I may have found a bug unless there's another way to do this.
I'm using upload! to upload assets to a remote list of servers. The task looks like this:
desc "Upload grunt compiled css/js."
task :upload_assets do
on roles(:all) do
%w{/htdocs/css /htdocs/js}.each do |asset|
upload! "#{fetch(:local_path) + asset}", "#{release_path.to_s + '/' + asset}", recursive: true
end
end
end
If local_path is defined as an absolute path such as:
set :local_path:, '/home/dcmbrown/projects/ABC'
This works fine. However if I do the following:
set :local_path:, '~/projects/ABC'
I end up getting the error:
The deploy has failed with an error: Exception while executing on ec2-54-23-88-125.us-west-2.compute.amazon.com: No such file or directory - ~/projects/ABC/htdocs/css
It's not a ' vs " issue as I've tried both (and I didn't think capistrano paid attention to that anyway).
Is this a bug? Is there a work around? Am I just doing it wrong?
I ended up discovering the best way to do this is to actually use path expansion! (headsmack)
irb> File.expand_path('~dcmbrown/projects/ABC')
=> "/home/dcmbrown/projects/ABC"
Of course what I'd like is to do automatic path expansion but you can't have everything. I think I was mostly dumbstruck that it didn't automatically; so much so I spent a couple of hours trying to figure out why it didn't work and ended up wasting time asking here. :(
I don't think the error is coming from the remote server, it just looks like it since it's running that upload command in the context of a deploy.
I just created a single cap task to just do an upload using the "~" character and it also fails with
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy#XXX: No such file or directory # rb_file_s_stat - ~/Projects/testapp/public/404.html
It appears to be a Ruby issue not Capistrano as this also fails in a Ruby console
~/Projects/testapp $ irb
2.2.2 :003 > File.stat('~/Projects/testapp/public/404.html')
Errno::ENOENT: No such file or directory # rb_file_s_stat - ~/Projects/testapp/public/404.html
from (irb):3:in `stat'
from (irb):3
from /Users/supairish/.rvm/rubies/ruby-2.2.2/bin/irb:11:in `<main>'

Using ftp-deploy with load-grunt-tasks causes errors

I've split my Gruntfile into multiple files using load-grunt-tasks but seem to get an error when using ftp-deploy. I've tried some different things, but I reason that the hyphen (-) in the "ftp-deploy" might cause problems.
I'm getting the following error:
Running "ftp-deploy:theme" (ftp-deploy) task
Verifying property ftp-deploy.theme exists in config...ERROR
>> Unable to process task.
Warning: Required config property "ftp-deploy.theme" missing. Use --force to continue.
When running:
grunt "ftp-deploy:theme" --verbose
My ftp-deploy script looks as follows:
# FTP DEPLOY
# -------
module.exports =
'ftp-deploy':
theme:
auth:
host: 'host.com'
port: 21
authKey: 'key'
src: 'drupal/sites/all/themes/theme_name'
dest: 'www/host.com/sites/all/themes/theme_name'
I've tried running it without incapsulating it inside the "theme:" object which works, but is essentially not what I want to do as I have different folders I want to transfer.
Any ideas to what a solution might be?
I found the answer myself.
'ftp-deploy':
Should of course not be included in the file.

SQLGetPrivateProfileString failed with

Typing the command: odbcinst -q -s on RHEL 6, I get the following error message:
odbcinst: SQLGetPrivateProfileString failed with .
All my DSN's are also not showing up when I run:
odbcinst -q -d
Type the command: env |grep 'ODBC' to check if the ODBCSYSINI and the ODBCINI variables are set. If no results are returned - you need to add the variables to the environment variable pointing to the directory and the path to where the odbc.ini file is located as follows (in my case for RHEL 6 it is located at /etc - others may have it on /usr/local/etc):
Edit ~\.bash_profile and add the following lines:
export ODBCSYSINI=/etc
export ODBCINI=/etc/odbc.ini
You are good to go!
In my case (ubuntu 16.04) it was related to this bug, just not ~/.odbc.ini but /etc/odbc.ini. Adding a line to /etc/odbc.ini
[empty-sys]
fixed the problem.
Its too late to answer on this question probably, but it is for those who still couldn't get this resolved using #kapil Vyas answer-
Adding to his answer, you will need to logout and then login again from your user for export commands (saved in .bash_profile) to work.
When I had this problem, I edited /usr/local/etc/odbcinst.ini to add:
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc8a.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
FileUsage = 1
Pooling = Yes
CPTimeout = 120
I hope this is helpful.