How to get openstack version using Horizon or Openstack client? - openstack

How to get OpenStack version using Horizon or OpenStack client?
When I ran the command openstack --version, I got below output :
openstack 3.15.0
Now from this, how we can get which relesae of openstack it is e.g. newton, kilo?
Another question, if I have access to Horizon dashbord, is it possible to get the version of openstack from UI?

I think it's worth noting that openstack --version from the command line is only going to give you the version of the openstack client on the system you're looking at. openstack host list or nova service-list might give you a better idea of where openstack services are running in your openstack deployment.
I don't recall seeing a way to see specific OpenStack service versions through Horizon. From the command line on a given service's host (like nova, neutron, cinder, keystone), you should be able to list the packages as installed.
I think the canonical installation uses the distribution's package manager:
For yum-based systems like rhel and centos
sudo yum list installed | grep openstack
sudo yum list installed | grep nova
For aptitude-based systems
sudo dpkg -l | grep openstack
sudo dpkg -l | grep nova
From there, you'll have to cross reference the release with the version from the OpenStack documentation. Nova version 14 would be the Newton release, for instance. See the nova versions here. For the list of releases, look here.

nova-manage --version will give you the OpenStack version.
The output will be a number which corresponds to letter in the alphabet. For example
if output is 18 then its OpenStack ROCKY Version, since 18 corresponds to 18th letter in the alphabet.
17- Queen
18- Rocky
19- Stein

Each service which is installed in OpenStack is a package with a version. So usually we get versions of individual service. For example to find the nova version then,
nova --version
If you want to know all packages related to nova then,
pip list | grep nova
From above, you will get the nova client and nova versions then search for the versions in **https://releases.openstack.org/teams/nova.html. Here you will get the versions segregated with respect to OpenStack release names.

Get output from openstack --version command and compare against the following.
Rocky 3.16.0
Queens 3.14.0
Pike 3.12.0
Ocata 3.8.1
Newton 3.2.0
Mitaka 2.3.0
Liberty 1.7.3
Kilo 1.0.6
Juno 0.4.1
Icehouse 0.3.1
For future releases refer to:
https://docs.openstack.org/releasenotes/python-openstackclient/

It is always good to know which version of OpenStack environment you are working with. Before the Liberty
version, all projects except Swift had a version based on the year and month. Starting with Liberty, all
components have a traditional version structure X.Y.Z., where X is always the same in one release.
Here is an example for Mitaka:
keystone-manage --version
9.0.0
nova-manage --version
13.0.0
And here is an example of the old-fashioned version convention used in OpenStack Kilo:
keystone-manage --version
2015.1.0
nova-manage --version
2015.1.0
Also you can find the version on the System Information tab in the Admin menu at the right corner of
the page bottom. In Table 11-2 , several of the latest OpenStack releases are listed.
Table 11-2. OpenStack Releases
Series Releases Initial Release Date
Juno 2014.2 October 16, 2014
Kilo 2015.1 April 30, 2015
Liberty Nova 12.0; Keystone 8.0; Neutron 7.0; Swift 2.4 October 15, 2015
Mitaka Nova 13.0; Keystone 9.0; Neutron 8.0; Swift 2.6 April 7, 2016
Newton Nova 14.0; Keystone 10.0; Neutron 9.0; Swift 2.8 October 6, 2016 (planned)
From Openstack docs

In RHOSP you can simply check the file in controller
# cat /etc/rhosp-release
Red Hat OpenStack Platform release 13.0.10 (Queens)
This will give you the exact version of the openstack installed

The sad answer is: You can't.
At least this is true if you are just a user for an OpenStack setup and don't have access to the backplane, logging into the actual servers providing a service. The API is the only stable way to access the services. Each service may or may not have its own OpenStack version, they are not necessarily all the same.
In theory, looking up the service catalog should do the job you're asking for since it contains the endpoints for each service your OpenStack cloud provides. And part of the endpoint URLs is the endpoint version. Unfortunately that needs not necessarily match the module version of the service.
Looking up the catalog can be done like this:
openstack catalog list -c Endpoints -f json | jq '.[].Endpoints[]' | grep url| sort -u
(you get the idea). Maybe that includes the infromation you are looking for.

In case you don't have permissions (HTTP error 403) to run:
openstack service list
openstack host list
Then look for "id" version at OS_AUTH_URL address, found in your tenant RC file (you can download the RC file in Horizon, under Project > API Access).
For example, here I'm using curl and jq to filter id version from: https://my.openstack.redhat.com:13000/v3:
$ curl https://my.openstack.redhat.com:13000/v3 | jq '.[] | .id'
"v3.10"
# Or:
$ curl https://my.openstack.redhat.com:13000 | jq -r '.versions.values[] | .id'
v3.10
According to https://docs.openstack.org/api-ref/identity/v3/
My Openstack version is 3.10, which also known as "Queen" (or RHOSP 13).

nova-manage --version will give you the OpenStack version. The output will be a number which corresponds to letter in the alphabet. For example if output is 18 then its OpenStack ROCKY Version, since 18 corresponds to 18th letter in the alphabet.

Related

how to install OpenStack on Ubuntu in 2022

On youtube there are many guides that show how to install openstack on ubuntu I have tried them and they seem not to work
For example with Devstack I fail every time the installation with .Stack.sh, with MicroStack I fail the initialization
I can't install OpenStack in any way!
could somebody help me?
I have installed openstack from various different ways but for me installing through Devstack is the easiest and the most convenient way to do it.
Let me share the installation steps that I use:
Firstly few prerequisites:
A fresh Ubuntu 20.04 installation (Ubuntu 18.04 Works)
8 GB RAM (4 GB RAM works)
4 vCPUs (2 vCPUs works)
Hard disk capacity of 20 GB (min 10 GB)
Step 1 : apt update -y && apt upgrade -y
Step 2: Create Stack user:
sudo adduser -s /bin/bash -d /opt/stack -m stack
echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
su - stack
Step 3:
git clone https://git.openstack.org/openstack-dev/devstack
cd devstack
Step 4: Create devstack configuration file
vim local.conf
Paste this:
[[local|localrc]]
# Password for KeyStone, Database, RabbitMQ and Service
ADMIN_PASSWORD=admin
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
# Host IP - get your Server/VM IP address from ip addr command
HOST_IP=0.0.0.0
Step 5: ./stack.sh
The setup will take about 10-15 minutes depending upon your system. Once installation is complete you can access the dashboard using https://your-ip/dashboard
Note: Incase the stack.sh fails make sure to use ./unstack and ./clean.sh before you use stack.sh again.

Amazon linux install openvpn3-client

Trying to install openvpn3-client on my amazon Linux followed this documentation, facing below error
Packages skipped because of dependency problems:
openvpn3-13-0.beta1.el7.x86_64 from copr:copr.fedorainfracloud.org:dsommers:openvpn3
openvpn3-client-13-0.beta1.el7.x86_64 from copr:copr.fedorainfracloud.org:dsommers:openvpn3
openvpn3-selinux-13-0.beta1.el7.noarch from copr:copr.fedorainfracloud.org:dsommers:openvpn3
python36-dbus-1.2.4-4.el7.x86_64 from epel
python36-gobject-base-3.22.0-6.el7.x86_64 from epel
I have already installed epel following this
Amazon linux install openvpn3-client & dependencies as per
https://github.com/OpenVPN/openvpn3-linux
See the instructions on
https://community.openvpn.net/openvpn/wiki/OpenVPN3Linux how to
install pre-built OpenVPN 3 Linux packages on Debian, Ubuntu, Fedora,
Red Hat Enterprise Linux, CentOS and Scientific Linux.
1 solution was to switch from AWS Linux (lack of dependencies & updates) to Fedora on AWS. No longer have to build from source / add dependancices,
older versions had to add the repo as per the above.
When I did an upgrade to Fedora 36 the latest openvpn3-linux v18 client was built in. Did not have to manually upgrade / install it:
openvpn3-admin version --services
e.g: previous v17 suddenly stopped working spend 10 hours trying to debug
"Trying to install openvpn3-client" and reinstall:
openvpn3 config-import --config profile.udp.ovpn --persistent
openvpn3 config-manage --config profile.udp.ovpn --enable-legacy-algorithms true --show
openvpn3 session-start --config profile.udp.ovpn
openvpn3 sessions-list
openvpn3 session-manage --config profile.udp.ovpn --disconnect
Actually thinking it was a cipher AES-256-CBC legacy issue that others were having. It was not for some reason, permissions on install of the OpenVPN3 Linux client? as it was NOT creating a TUN.
So I made one myself (that was the actual issue) and it connected after asking for VPN Username & Password, no need to install again / reinstall afterall:
sudo ip tuntap add name tun0 mode tun
sudo ip link show
Other Amazon linux install openvpn3-client issues help is here: https://github.com/OpenVPN/openvpn3-linux/issues?q=cipher

Instance creation in devstack icehouse

I want to create few instance having ubuntu installed on it using openstack.
I tried following steps
Approach 1
installed icehouse devstack
git clone -b stable/icehouse https://github.com/openstack-dev/devstack.git
cd devstack
./stack.sh
after successful installation i uploaded a ubuntu image
glance image-create --name Ubuntu --disk-format iso --container-format bare <~/sumit/images/ubuntu-14.04.2-desktop-amd64.iso
login to dashboard and launch the instance (m1.small, RAM GB, total disk 20GB) using this image.
open the instance console from horizon dashboard and try to install ubuntu
Βut it shows required space(6.5GB) in not available.
Τhen I tried to install neutron and heat also
Approach 2
installed icehouse devstack
git clone -b stable/icehouse https://github.com/openstack-dev/devstack.git
cd devstack
vi localrc
my localrc looks like
DEST=/opt/stack
LOGFILE=$DEST/logs/stack.sh.log
VERBOSE=True
LOG_COLOR=False
SCREEN_LOGDIR=$DEST/logs/screen
ADMIN_PASSWORD=password
MYSQL_PASSWORD=openstack
RABBIT_PASSWORD=openstack
SERVICE_PASSWORD=openstack
SERVICE_TOKEN=tokentoken
GLANCE_BRANCH=stable/icehouse
HORIZON_BRANCH=stable/icehouse
KEYSTONE_BRANCH=stable/icehouse
NOVA_BRANCH=stable/icehouse
NEUTRON_BRANCH=stable/icehouse
HEAT_BRANCH=stable/icehouse
CEILOMETER_BRANCH=stable/icehouse
DISABLED_SERVICES=n-net ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta,q-metering,neutron
ENABLED_SERVICES+=,q-lbaas
ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng
HEAT_STANDALONE=True
ENABLED_SERVICES+=,ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-api
ENABLED_SERVICES+=,ceilometer-alarm-notify,ceilometer-alarm-eval
After this
./stack.sh
after successful installation Ι uploaded a ubuntu image
glance image-create --name Ubuntu --disk-format iso --container-format bare <~/sumit/images/ubuntu-14.04.2-desktop-amd64.iso
login to dashboard and launch the instance (m1.small, RAM GB, total disk 20GB) using this image.
But now it displays
Error: Unable to connect to Neutron
Every time Ι list the instance it displays same error.
Can anyone help me out to overcome all these problems so that Ι can launch some instances and install ubuntu on that.
Unable to connect can be because neutron service is not running. Through Dashboard you cannot create instance without network. Use screen command in devstack to check if neutron is running properly.

How can I get the names of the applications that are installed on an application server?

I have an SSH access to my application. Is there any UNIX code that I can use to get the name of the applications installed?
Thanks!
Actually I don't understand when you talk about "my applicattion" or "applications installed" what are you exactly refering.
1) If you want to know what applications are deployed, for example in the application server of your instance, for example Tomcat 7 you can take a look here: List Currently Deployed Applications
2) Or maybe you are looking for SO installed applications.
Depeending on what OS is running may be different. For example for Red Hat Enterprise / Fedora Linux / Suse Linux / Cent OS:
Under Red Hat/Fedora Linux:
$ rpm -qa | grep {package-name}
For example find out package mutt installed or not:
$ rpm -qa | grep mutt
Output:
mutt-1.4.1-10
If you don't get any output ( package name along with version), it means package is not installed at all. You can display list all installed packages with the following command:
$ rpm -qa
$ rpm -qa | less
3) Another useful command is ps command. You can check what is running with the ps command.
Type the following ps command to display all running process:
ps aux | less
Where,
A: select all processes
a: select all processes on a terminal, including those of other users
x: select processes without controlling ttys
Task: see every process on the system
ps -A
ps -e

What does cifs_mount failed w/return code = -22 indicate

I am trying
sudo mount -t cifs //<server>/<share> -o username=user#domain,password=**** /mnt/<mountpoint>
error message:
mount: wrong fs type, bad option, bad superblock on //server/share,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
The syslog has
CIFS VFS: cifs_mount failed w/return code = -22
I am able to mount the same share on another centos system. I can ping the server, mount point directory has been created.
I ran into this problem when using a host name and solved it by using an IP address. E.g.:
use
mount -t cifs //192.168.1.15/share
rather than
mount -t cifs //servername/share
Another possible solution is to install
cifs-utils
.
Ah, the dreaded -22. Basically this seems to be used as a catchall for "something didn't work", although technically it's referred to as an invalid argument.
The client does IMHO a very poor job of telling you the actual problem. (This may not be its fault - it doesn't always have access to that information).
However -- have you checked the logs on the server/machine you are connecting to?
I was connecting to an OS X samba server, and learned from what I found in the logs there that it was necessary to specify additional options under -o as follows:
nounix,sec=ntlmssp
Among the things these settings enable are "allow long names", and "ignore UNIX filename endings"...sec is to specify security flags.
Another possibility is that you're trying to access a filesystem of a type that mount.cifs can't actually handle.
For RHEL/Centos install package - "cifs-utils"
Maybe move the target?
sudo mount -t cifs -o username=user#domain,password=**** //<server>/<share> /mnt/<mountpoint>
Or maybe this solution? (Ubuntu, Debian methods)
sudo apt-get install smbfs
Or for CentOS, RedHat, Fedora try:
sudo yum install samba-client
I had a similar issue on Ubuntu 12.04 with the "mount" package (version 2.20.1-1ubuntu3).
It happened when I was trying to mount the server share using its hostname rahter than its IP.
Another way to solve the issue on Ubuntu was to install the cifs-utils package. That way I could also mount the samba share using the exact same command line (or fstab) but with hostname.
sudo mount -t cifs //hostname/share -o username=user,password=pwd /mnt/share
Just did a clean install of Ubuntu 12.04 LTS and got this trying to hook up my Linux HTPC.
Solved it by running: sudo apt-get install cifs-utils then remounting it.
CIFS returns code "-22" in many cases (not only invalid arguments).
For me installing keyutils did the trick:
apt-get install keyutils
My distribution is "Ubuntu 14.04.2 LTS".
I figured this out by increasing the logging verbosity of CIFS:
echo 7 > /proc/fs/cifs/cifsFYI
# disable again via:
#echo 0 > /proc/fs/cifs/cifsFYI
Documentation on the bitmask ("7") for cifsFYI can be found here: https://www.kernel.org/doc/readme/Documentation-filesystems-cifs-README
After trying to mount once more dmesg included more helpful information:
Dec 7 12:34:20 pc1471 kernel: [ 5442.667417] CIFS VFS: dns_resolve_server_name_to_ip: unable to resolve:
Another maybe helpful link:
http://vlkan.com/blog/post/2015/01/08/smb-mount-troubleshoot/
I have Ubuntu Server 12.10 x64 installed as a VMware VM, running on OS X 10.8 (Mountain Lion).
On the Mac, in SYSTEM PREFERENCES > SHARING > FILE SHARING (on), I added a folder to share. For my tests, I created a new folder within my Public folder called "ubuntu".
In Ubuntu, I issued the following commands:
sudo mkdir /media/target
sudo mount.cifs //10.0.20.3/ubuntu /media/target -o username=davidallie,nounix,sec=ntlmssp,rw
Ubuntu prompted me for the password and, once entered, mounted the folder. I then ran:
df -H
which allowed me to verify the mounts and mount-points.
This has recently manifested thanks to a kernel bug in v5.18.8+, I was able to reproduce on v5.18.9 and v5.18.11.
Here is the relevant ticket on kernel.org, quote:
it appears that kernel 5.18.8 breaks cifs mounts on my machine. With
5.18.7, everything works fine. With 5.18.8, I am getting:
$ sudo mount /mnt/openmediavault/
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel
log messages (dmesg)
The relevant /etc/fstab line is:
//odroidxu4.local/julian /mnt/openmediavault cifs
credentials=/home/julas/.credentials,uid=julas,gid=julas,vers=3.1.1,nobrl,_netdev,auto
0 0
Here is the offending commit, and here is the fix, which applies cleanly to v5.18.11. The cause is, from what I understand, a bug in old versions of the samba server in the negotiation protocol.
If this is your issue, you can:
patch your kernel yourself;
downgrade to v5.18.7;
switch to an LTS kernel;
use the userspace (and also really slow and awful) gvfs-smb;
upgrade the samba version on your server; or
add vers=2.0 to the mount.cifs options in /etc/fstab.
Note that while I haven't tried the last one personally, the venerable #SEBiGEM has confirmed in the comments that it works for v5.18.10.
Note also that I didn't try upgrading samba on the server at all because I hate touching the box it's running on - every time I upgrade anything everything breaks. Doing so might also not be an option for those with NAS appliances.
As a personal sidenote, it's a little sad that so many different things can cause -22. My answer is correct, but very very niche and specific to this point in time. I imagine in a month it will simply be useless noise.
Just experience the problem on RHEL 5. You don't need to install the samba suite, just the samba-client and any dependencies.
Maybe it's too late, but simplest solution described in kernel bug 50631:
in the latest code, unc mount parameter in mandatory. Modified command works for me:
sudo mount -t cifs //<server>/<share> -o username=user#domain,password=****,unc=\\\\<server>\\<share> /mnt/<mountpoint>
Try run the comamnd:
$modinfo cifs
filename: /lib/modules/3.2.0-60-virtual/kernel/fs/cifs/cifs.ko
version: 1.76
description: VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows
license: GPL
author: Steve French <sfrench#us.ibm.com>
srcversion: 9435BBC2F61D29F06643803
depends:
intree: Y
vermagic: 3.2.0-60-virtual SMP mod_unload modversions 686
parm: CIFSMaxBufSize:Network buffer size (not including header). Default: 16384 Range: 8192 to 130048 (int)
parm: cifs_min_rcv:Network buffers in pool. Default: 4 Range: 1 to 64 (int)
parm: cifs_min_small:Small network buffers in pool. Default: 30 Range: 2 to 256 (int)
parm: cifs_max_pending:Simultaneous requests to server. Default: 32767 Range: 2 to 32767. (int)
parm: echo_retries:Number of echo attempts before giving up and reconnecting server. Default: 5. 0 means never reconnect. (ushort)
parm: enable_oplocks:Enable or disable oplocks (bool). Default:y/Y/1 (bool)
If your getting any error then cifs is not installed. Just check with your admin. I thought it helps out.
Adding the option vers=3.0 to the mount command worked for me: sudo mount -t cifs -v <src> <dst> -o ...,vers=3.0,...
You need to install cifs-utils first , just as follows:
sudo yum install cifs-utils
I know this is old, but on older cifs-utils versions, you may have to add the following two lines to /etc/request-key.conf
create cifs.spnego * * /usr/sbin/cifs.upcall -c %k
create dns_resolver * * /usr/sbin/cifs.upcall %k
Workaround without installing additional packages (cifs-utils adds another 81mb in Debian Stretch):
$ FILESERVER_IP=$(getent hosts myfileserver.com | awk '{ print $1 ; exit }')
$ sudo mount -t cifs //${FILESERVER_IP}/<share> -o username=user#domain,password=**** /mnt/<mountpoint>
Many answers, but wasn't work for me.
Solution:
My NAS didn't support Samba 3.0, on which my mount switch automatically.
So I downgraded smb version:
mount -t cifs //192.168.0.2/Share -o rw,vers=1.0,username=*****,password=******* /media/1
It's work.

Resources