openstack glace unknown command - openstack

every image related command I use ends up with an error:
glance image-create --name='Ubuntu 12.04 x86_64 Server' --disk-format=qcow2 --container-format=bare --public < precise-server-cloudimg-amd64-disk1.img
Usage: glance [options] [args]
Commands:
help <command> Output help for one of the commands below
add Adds a new image to Glance
update Updates an image's metadata in Glance
delete Deletes an image from Glance
index Return brief information about images in Glance
details Return detailed information about images in
Glance
show Show detailed information about an image in
Glance
clear Removes all images and metadata from Glance
Member Commands:
image-members List members an image is shared with
member-images List images shared with a member
member-add Grants a member access to an image
member-delete Revokes a member's access to an image
members-replace Replaces all membership for an image
glance: error: no such option: --name
Cut down the above command and got this:
glance image-create
Usage: glance [options] [args]
Commands:
help <command> Output help for one of the commands below
add Adds a new image to Glance
update Updates an image's metadata in Glance
delete Deletes an image from Glance
index Return brief information about images in Glance
details Return detailed information about images in
Glance
show Show detailed information about an image in
Glance
clear Removes all images and metadata from Glance
Member Commands:
image-members List members an image is shared with
member-images List images shared with a member
member-add Grants a member access to an image
member-delete Revokes a member's access to an image
members-replace Replaces all membership for an image
Unknown command: image-create
I can't figure it out.
NOTE: I'm using a VM running Ubuntu Precise and python-glanceclient is no longer available for it.

For your first command, you are using the '=' character, which is not required. Note the glance image-create command help:
usage: glance image-create [--id <IMAGE_ID>] [--name <NAME>] [--store <STORE>]
[--disk-format <DISK_FORMAT>]
[--container-format <CONTAINER_FORMAT>]
[--owner <TENANT_ID>] [--size <SIZE>]
[--min-disk <DISK_GB>] [--min-ram <DISK_RAM>]
[--location <IMAGE_URL>] [--file <FILE>]
[--checksum <CHECKSUM>] [--copy-from <IMAGE_URL>]
[--is-public {True,False}]
[--is-protected {True,False}]
[--property <key=value>] [--human-readable]
[--progress]
The second command should be valid. You may want to reinstall the glance commands. Try installing it using pip:
sudo pip install python-glanceclient

Related

goland: when i execute go mod tidy in goland,why "goproxy.io" is in the package url

go mod tidy in goland
*bitbucket.org/xxxproject/db_proxy_api_model/models/v1 : cannot find module providing package.
reading https://goproxy.io/bitbucket.org/xxxproject/db_proxy_api_model/models/#v/list: 404 Not Found
server response:
not found: module bitbucket.org/xxxproject/db_proxy_api_model/models: git ls-remote -q origin in /tmp/gopath/pkg/mod/cache/vcs/cf011ef4494e04c40886924c664c719ff30fb53c96bff1250e26ef05478bbd13: exit status 128:
fatal: could not read Username for 'https://bitbucket.org': terminal prompts disabled.
Confirm the import path was entered correctly.If this is a private repository, see https://golang.org/doc/faq#git_https for additional information.*
enter image description here
I set goproxy=https://goproxy.io,but its not the point, the problem is also appear in the case of dont use proxy.
what can i do solving the problem
The project seems to be a private one and you should specify GOPRIVATE variable (https://go.dev/ref/mod#private-module-proxy-direct) via Preferences/Settings | Go | Go Modules | Environment. GoLand will be able to pick up the environment.

AWS CodeBuild failure on getting source

I have CodeBuild project that works fine.
Trying to use it in CodePipeline and it failure with empty Repository and Submitter.
Failure logs are simple as:
01:34:17
[Container] 2018/03/08 01:34:10 Waiting for agent ping

01:34:17
[Container] 2018/03/08 01:34:12 Waiting for DOWNLOAD_SOURCE
There are no any settings to adjust CodeBuild phase anywhere.
How can I fix/customise it?
Recreate the build project from within CodePipeline, so it receives the source code from the provider called "CodePipeline".
Source of the information: https://apassionatechie.wordpress.com/2018/02/08/codebuild-aws-from-codepipeline-aws/
Just if somebody would need an answer.
The issue was in not precise file naming for CodeBuild stage where CodeDeploy in it's turn won't be able to pull the ZIP file.
As a fix I've added an extra command to builspec.yml
post_build:
commands:
- zip -r Application.zip target/Application-0.0.1.war

Systrace - error truncating /sys/kernel/debug/tracing/set_ftrace_filter: No such device (19) unable to start

I am currently working on a project which aims to find out what the system is doing behind a series of user interaction on the android UI. For example, if user click send button in Facebook Messenger, the measured response time for such action is 1.2 seconds. My goal is to figure out what the 1.2 seconds consist of. My friend suggested that I should take a look into 'Systrace'.
However, when I tried systrace on my HTC one M8, I have encountered some problems:
First, error opening /sys/kernel/debug/tracing/options/overwrite - no such file or directory. I solved this problem by building up the support of the kernel following http://opensourceforu.com/2010/11/kernel-tracing-with-ftrace-part-1/ and mount -t debugfs none /sys/kernel/debug. Then I could find the tracing directory. Besides, I set ro.debuggable=1 in file default.prop within Ramdisk and burn the boot.img into my phone.
Now I encounter another problem: when I run - python systrace.py --time=10 -o mynewtrace.html sched gfx view wm, the following error(19) pop up: error truncating /sys/kernel/debug/tracing/set_ftrace_filter: No such device (19). I don't know if the way my building up kernel support for systrace is incorrect or anything is missing.
Could anyone helps me out with this problem, please?
I think I have worked out the solution. My environment is Ubuntu 16.04 + HTC one M8. I will write the steps as followed:
open terminal and enter: $adb shell
(1) $su (2) $mount -t debugfs none /sys/kernel/debug. Now you should be able to see many directories under /sys/kernel/debug/. (You may cd into /sys/kernel/debug to confirm this)
New a new terminal and enter: dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/sdcard/boot.img to generate the boot.img kernel image from your device.
Use AndroidImageKitchen to unpack the boot.img and find the default.prop within Ramdisk folder. Then change ro.debuggable=0 to ro.debuggable=1. Repack the boot.img and flash boot it to your device.
Once the device boot, under terminal, enter: adb root and message like: restarting adbd as root may pop up. Disconnect the USB and connect again.
cd to the systrace folder, e.g. ~/androidSDK/platform-tools/systrace and use:
python systrace.py --time=10 -o mynewtrace.html sched gfx view wm
Now you may able to generate your own systrace files.

Configuring Nexus 3 (3.0m7) to run as a Linux Service

Can anyone help me translate the instructions for setting this up as a Linux Service (at http://books.sonatype.com/nexus-book/3.0/reference/install.html#service-linux) into English?
After following them as best I could, I get the following when starting the service:
su: user / does not exist
Here are the parts of the instructions which were unclear:
In the bin/nexus script remove the line below.
INSTALL4J_JAVA_PREFIX="su - $run_as_user -c"
The line in the file is actually
INSTALL4J_JAVA_PREFIX=""
but ok, I can remove that. However, the next instruction is:
Replace the entire link with this line:
exec su - $run_as_user "$prg_dir/$progname" $#
What is meant by "the entire link"? The thing I removed above? That was the first line in the file - therefore the three variables above have not yet been set.... and is probably the reason the script currently fails.
I'll get the book fixed, it shouldn't have this in it anymore.
Download the 3.0 release, this was just a bug in 3.0m7, and it has been fixed. You don't need to make these changes.
https://support.sonatype.com/hc/en-us/articles/217965118
The only things you need to do is edit $NEXUS_HOME/bin/nexus.rc, uncomment the run_as_user line, and set the value for it appropriately. Then just symlink $NEXUS_HOME/bin/nexus to /etc/init.d/nexus, and after that run chkconfig or update-rc.d depending on your Linux version.

Symfony Console Output

I am writing my first symfony console apps and I would like to ask a question regarding the console outputs.
When I run a new CLI app in the console like: ./testapp then I get the following output:
Usage:
command [options] [arguments]
Options:
--help (-h) Display this help message
--quiet (-q) Do not output any message
--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V) Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
--no-interaction (-n) Do not ask any interactive question
Available commands:
help Displays help for a command
list Lists commands
Is there a way to remove the display of this content? I want only the "Available Commands" to be visible. And is it possible to create my own groups in this display?
As of Symfony 2.5, you can change the default command (the command that's executed when no command name was specified). See for more information: http://symfony.com/doc/current/components/console/changing_default_command.html
The Console component will always run the ListCommand when no command name is passed. In order to change the default command you just need to pass the command name to the setDefaultCommand method.
(Symfony Console 4.1)
It's possible to remove the default options:
$options = $app->getDefinition()->getOptions();
unset($options['ansi']);
unset($options['no-interaction']);
unset($options['verbose']);
unset($options['help']);
unset($options['quiet']);
unset($options['version']);
unset($options['no-ansi']);
$app->getDefinition()->setOptions($options);
or just:
$app->getDefinition()->setOptions();
Options group will not show in the list command.
Although I don't know if this has any undesirable side effect.

Resources