First steps with Charmed OSM

Hello @davigar15,

This^ has been most helpful! :slight_smile:


I am setting up a charmed distribution of OSM along with MicroStack, i.e., ./install_osm.sh --charmed --microstack and although the whole process completed successfully, MicroStack has not been added as a VIM.

My system is running Ubuntu 18.04.

I grepped for errors and could only find:
Error while executing command: ConflictException: 409, Security group rule already exists. Rule id is 65339638-dfd1-4ca5-96a9-74c06acc2342.

Another problem that would lead to MicroStack not being added as a VIM is the OSM_HOSTNAME not working with the xip.io DNS service (which I believe is down).

Thus, due OSM_HOSTNAME being non resolvable, any osm-client command will have failed, as we can see here:

curl https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img | microstack.openstack image create --public --container-format=bare --disk-format=qcow2 ubuntu20.04
(6, 'Could not resolve host: nbi.VM_IP.xip.io')                                                                                                                            
Maybe "--hostname" option or OSM_HOSTNAME environment variable needs to be specified                                                                                                   
Your installation is now complete, follow these steps for configuring the osmclient:                                                                                                   
                                                                                                                                                                                       
1. Create the OSM_HOSTNAME environment variable with the NBI IP                                                                                                                        
                                                                                                                                                                                       
export OSM_HOSTNAME=nbi.VM_IP.xip.io:443                                                                                                                                        
                                                                                                                                                                                       
2. Add the previous command to your .bashrc for other Shell sessions

echo "export OSM_HOSTNAME=nbi.VM_IP.xip.io:443" >> ~/.bashrc

Questions

  1. Is this a known issue with xip.io?
  2. I searched for what the installation script does for a charmed + microstack installation and I can see from the osm-devops repository, here that it doesn’t use xip.io.
    Am I missing something with the installation script?
    I downloaded it via wget https://osm-download.etsi.org/ftp/osm-9.0-nine/install_osm.sh.

Thank you in advance! :slightly_smiling_face:

Hello @chris.asl!

Thanks for your message! Really glad to know that you are using Microstack :slight_smile:

Unfortunately, the xip.io Wildcard DNS is no longer available, and we moved to nip.io.

You can use the latest installer following these instructions:

wget http://osm-download.etsi.org/ftp/osm-9.0-nine/install_osm.sh
chmod +x install_osm.sh
./install_osm.sh -R testing-daily -r testing --charmed --microstack

I hope this message will unblock you. If you face any more issues, let me know :slight_smile:

Regards,
David

Thank you for the prompt reply @davigar15!

I’ve tried the command you’ve send me but got an error regarding MicroStack and the --auto flag.

juju status shows all services active, but sudo snap services microstack shows many of the core services, e.g. neutron-api disabled.

Here’s the error output from the installation script

Trying to install osmclient from channel 9.0/stable
osmclient (9.0/stable) v9.1.1-dirty from OSM Support (osmsupport) installed
osmclient snap installed
39002d9a-a987-434d-950d-cd66365df912
28b43380-8e1f-4f60-982c-561be6bfb461
Warning: flag --classic ignored for strictly confined snap microstack

microstack (beta) ussuri from Canonical✓ installed
Traceback (most recent call last):
  File "/snap/microstack/233/bin/microstack_init", line 11, in <module>
    load_entry_point('microstack-init==0.0.1', 'console_scripts', 'microstack_init')()
  File "/snap/microstack/233/lib/python3.8/site-packages/init/main.py", line 60, in wrapper
    return func(*args, **kwargs)
  File "/snap/microstack/233/lib/python3.8/site-packages/init/main.py", line 169, in init
    auto = process_init_args(args)
  File "/snap/microstack/233/lib/python3.8/site-packages/init/main.py", line 126, in process_init_args
    raise ValueError('A role (--compute or --control) must be specified '
ValueError: A role (--compute or --control) must be specified  when using --auto

Due to the output above, I believe microstack --init wasn’t run.


Additionally, I presume here are the commands the installation script runs to setup MicroStack networking and add it as a VIM.

I presume we can use these commands to setup an externally instantiated instance of MicroStack :slightly_smiling_face:

@davigar15 sorry for bugging you again, but I just figured out from the error above that the osm-devops package installed does not contain the updated version of the charmed_install.sh script :frowning_face:

It downloads this package
https://osm-download.etsi.org/repository/osm/debian/testing-daily/pool/devops/

which doesn’t contain the latest 9.0 version.

I’ve modified the release to use ReleaseNINE-daily which installs 9.1.1 that contains the updated charmed_install.sh script.

Am I missing something or it is simply a matter of releasing a new 9.0.0rc1 package which contains the latest code changes?

Thank you in advance :slightly_smiling_face:

I am also getting this error while triggering installation script with --charmed flag

cmd: ./install_osm.sh --charmed

error: permanently dropping privs did not work: File exists
permanently dropping privs did not work: File exists
Microk8s storage failed to enable
permanently dropping privs did not work: File exists

Please help !!!

I am stuck

Hello @rachit24,

Where are you installing OSM? Could you tell me please the OS you are using, the memory, disk, and cpus that you are allocating to the machine?

I have updated the instructions to deploy the latest release of OSM (Release TEN)

Please provide me the link where can i find the latest instructions.

Thanks for replying.

Please find the below details.

OS - Ubuntu 20.4 and 18.04
Memory- 32GB
disk- 150 GB
cpu-16

Hi @davigar15,

Thanks for the installation guide!,
I have encountered the following problem at the end of the installation:

14 / 14 services active
OSM with charms deployed
Trying to install osmclient from channel 10.0/stable
Se ha instalado osmclient (10.0/stable) v10.0.1-0-g42e87fa por OSM Support (osmsupport)
osmclient snap installed
ERROR: Error 404: <html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.19.0</center>
</body>
</html>

ERROR: Error 404: <html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.19.0</center>
</body>
</html>

Your installation is now complete, follow these steps for configuring the osmclient:

1. Create the OSM_HOSTNAME environment variable with the NBI IP

export OSM_HOSTNAME=nbi.192.168.68.105.nip.io:443

2. Add the previous command to your .bashrc for other Shell sessions

echo "export OSM_HOSTNAME=nbi.192.168.68.105.nip.io:443" >> ~/.bashrc

DONE

After creating the variables appears the following issue:

osm version
ERROR: Error 404: <html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.19.0</center>
</body>
</html>

How can i solve it? Thanks

1 Like

Hello,

I’m getting the same error as mentioned here along with an ValueError: A role (--compute or --control) must be specified when using --auto error regarding microstack initialization proccess, when trying to install OSM along with microstack using the command : ./install_osm.sh --charmed --microstack .

Are these known issues?
Thanks in advance.

Same error here

Hello @virs,

There was a fix for that that probably hasn’t land in ReleaseTEN yet.

I updated the instructions to get the installer from master:

To fix the issue you could delete the current installation and execute the command above again. (to uninstall: juju kill-controller osm-vca -t 0 -y)

Hello, there is an upstream bug to track the microstack issue.

As a workaround, install OSM without the --microstack option, and instead, after the installation, execute the following:

sudo snap install microstack --devmode --channel beta
sudo snap set microstack config.network.ports.dashboard=8080
sudo microstack.init --auto --control

. /var/snap/microstack/common/etc/microstack.rc
microstack.openstack network create --enable --no-share osm-ext
microstack.openstack subnet create osm-ext-subnet --network osm-ext \
                                                    --dns-nameserver 8.8.8.8 \
                                                    --subnet-range 172.16.0.0/24
microstack.openstack router create external-router
microstack.openstack router add subnet external-router osm-ext-subnet
microstack.openstack router set --external-gateway external external-router
for i in $(microstack.openstack security group list | awk '/default/{ print $2 }'); do
    microstack.openstack security group rule create $i --protocol icmp --remote-ip 0.0.0.0/0
    microstack.openstack security group rule create $i --protocol tcp --remote-ip 0.0.0.0/0
done

curl https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img | microstack.openstack image create --public --container-format=bare --disk-format=qcow2 ubuntu16.04
curl https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img | microstack.openstack image create --public --container-format=bare --disk-format=qcow2 ubuntu18.04
export VIM_NAME=microstack
osm vim-create --name $VIM_NAME --user "$OS_USERNAME" --password "$OS_PASSWORD" \
    --auth_url "$OS_AUTH_URL/v3" --tenant "$OS_USERNAME" --account_type openstack \
    --config='{use_floating_ip: True, management_network_name: osm-ext}'

That should fix it :wink:

4 Likes

Hi, I did this but I’m still getting the same error that @vris when accessing the UI:

When I run the command:
microk8s.kubectl -n osm describe ingress,
I get in the default backend
default-http-backend:80 (<error: endpoints "default-http-backend" not found>)
There is no connection with the NBI. How can I fix this. Thank you.

1 Like

Hello @davigar15, I am having the same issue as described by @virs. I tried the fix that you identified but it didn’t work, I’m still having the 404 errors when trying to use osm commands.

This is clearly an issue with version 10, I installed version 9 and everything works correctly. Looks like the ingress is not routing correctly the requests or does not have a correct route to the service hence falling in the default backend and given that this one is not defined as you can see in my previous post, it throws a 404 error.

@gruyaume, @amh94, and @virs:

Have you tested what I explained in the following comment?

Hi, yeah, i tried what you suggested but it didn’t work either at least for me. Then I uninstalled again and install version nine.

Yes, i tried that but it didnÂŽt work