In some cases, DNS resolution works on the host but fails when building the Docker container. This is caused when Docker doesn't automatically determine the DNS server to use.
If it does not work, you have to configure Docker to use the available DNS.
#### Checking whether all processes/services are running in K8s
```bash
# Get the IP address you’re using for DNS:
nmcli dev show | grep'IP4.DNS'
# Create a new file, /etc/docker/daemon.json, that contains the following (but replace the DNS IP address with the output from the previous step:
{
"dns": ["192.168.24.10"]
}
# Restart docker
sudo service docker restart
# Re-run
docker run busybox nslookup archive.ubuntu.com
# Now you should be able to re-run the installer and move past the DNS issue.
kubectl -n osm get all
```
##### TypeError: `unsupported operand type(s) for -=: 'Retry' and 'int'`
### Issues on standard installation
In some cases, a MTU mismatch between the host and docker interfaces will cause this error while running pip. You can check this by running `ifconfig` and comparing the MTU of your host interface and the `docker_gwbridge` interface.
```bash
# Create a new file, /etc/docker/daemon.json, that contains the following (but replace the MTU value with that of your host interface from the previous step:
{
"mtu": 1458
}
# Restart docker
sudo service docker restart
```
#### Problem deploying stack osm
#### Docker Swarm
##### `network netosm could not be found`
@@ -159,9 +100,9 @@ It usually happens when a `docker system prune` is done with the stack stopped.
${OSM_NETWORK_NAME}"
```
### Juju
#### Juju
#### Bootstrap hangs
##### Juju bootstrap hangs
If the Juju bootstrap takes a long time, stuck at this status...
@@ -193,7 +134,7 @@ Next, tail the output of cloud-init to see where the bootstrap is stuck.
@@ -204,7 +145,7 @@ Model Controller Cloud/Region Version SLA
default osm localhost/localhost 2.3.7 unsupported
```
#### ERROR controller osm already exists
##### ERROR controller osm already exists
Did OSM installation fail during juju installation with an error like "ERROR controller osm already exists" ?
@@ -243,9 +184,17 @@ juju list-controllers
./install_osm.sh
```
### LXD
##### No controllers registered
The following error appears when the user used for installation does not belong to some groups:
_Finished installation of juju_ Password: **sg: failed to crypt password with previous salt: Invalid argument** ERROR No controllers registered.
To fix it, just add the non-root user used for installation in *sudo , lxd, docker* groups
#### LXD
#### ERROR profile default: `/etc/default/lxd-bridge` has IPv6 enabled
##### ERROR profile default: `/etc/default/lxd-bridge` has IPv6 enabled
Make sure that you follow the instructions in the [Quickstart](01-quickstart.md).
@@ -258,50 +207,72 @@ When dialog messages related to LXD configuration are shown, please answer in th
-<<Defaultvaluesapplyfornextquestions>>
-**Do you want to setup an IPv6 subnet? No**
### Configuration
### Issues on advanced installation (manual build of docker images)
### NBI
#### Manual build of images. Were all docker images successfully built?
#### SSL certificate problem
By default, OSM installer uses a self-signed certificate for HTTPS. That might lead to the error '_SSL certificate problem: self signed certificate_' on the client side. For testing environments, you might want to ignore this error just by using the appropriate options to skip certificate validation (e.g. `--insecure` for curl, `--no-check-certificate` for wget, etc.). However, for more stable setups you might prefer to address this issue by installing the appropriate certificate in your client system.
These are the steps to install NBI certificate on the client side (tested for Ubuntu):
Although controlled by the installer, you can check that the following images exist:
1. Get the certificate file `cert.pem` by any of these means:
In some cases, DNS resolution works on the host but fails when building the Docker container. This is caused when Docker doesn't automatically determine the DNS server to use.
3. Add to the list of `/etc/hosts` a host called "nbi" with the IP address where OSM is running.
- It can be `localhost` if client and server are the same machine.
- For localhost, you would need to add (or edit) these lines:
```text
127.0.0.1 localhost nbi
OSM-ip nbi
# Get the IP address you’re using for DNS:
nmcli dev show | grep'IP4.DNS'
# Create a new file, /etc/docker/daemon.json, that contains the following (but replace the DNS IP address with the output from the previous step:
{
"dns": ["192.168.24.10"]
}
# Restart docker
sudo service docker restart
# Re-run
docker run busybox nslookup archive.ubuntu.com
# Now you should be able to re-run the installer and move past the DNS issue.
```
4. Finally, for the URL, use the `nbi` as host name (i.e. <httts://nbi:9999/osm>).
- Do not use neither `localhost` nor 127.0.0.1.
- You can run a quick test with `curl` by:
##### TypeError: `unsupported operand type(s) for -=: 'Retry' and 'int'`
In some cases, a MTU mismatch between the host and docker interfaces will cause this error while running pip. You can check this by running `ifconfig` and comparing the MTU of your host interface and the `docker_gwbridge` interface.
```bash
curl https://nbi:9999/osm/version
# Create a new file, /etc/docker/daemon.json, that contains the following (but replace the MTU value with that of your host interface from the previous step:
{
"mtu": 1458
}
# Restart docker
sudo service docker restart
```
### VIMs
## Common issues with VIMs
#### Is the VIM URL reachable and operational?
### Is the VIM URL reachable and operational?
When there are problems to access the VIM URL, an error message similar to the following is shown after attempts to instantiate network services:
@@ -354,7 +325,7 @@ docker stack deploy -c /etc/osm/docker/docker-compose.yaml osm
This is persistent after reboots and restarts of the osm docker stack.
#### Authentication
### VIM authentication
**What should I check if the VIM authentication is failing?**
@@ -384,6 +355,8 @@ For casual testing, when adding the VIM account to OSM, you can use `'insecure:
$ osm vim-create VIM-NAME ... --config'{insecure: True}'
```
### Issues when trying to access VM from OSM
**Is the VIM management network reachable from OSM (e.g. via ssh, port 22)?**
The simplest check would consist on deploying a VM attached to the management network and trying to access it via e.g. ssh from the OSM host.
@@ -399,36 +372,9 @@ If this does not work, typically it is due to one of these issues:
- Security group policy in your VIM is blocking your traffic (contact your admin to fix it)
- IP address space in the management network is not routable from outside (or in the reverse direction, for the ACKs).
### Operational issues
## Common issues with VCA/Juju
### Running out of disk space
If you are upgrading frequently your OSM installation, you might face that your disk is running out of space. The reason is that the previous dockers and docker images might be consuming some disk space. Running the following two commands should be enough to clear your docker setup:
```bash
docker system prune
docker image prune
```
If you are still experiencing issues with disk space, logs in one of the dockers could be the cause of your issue. Check the containers that are consuming more space (typically kafka-exporter)
```bash
du-sk /var/lib/docker/containers/* |sort -n
docker ps |grep <CONTAINER_ID>
```
Then, remove the stack and redeploy it again after doing a prune:
In extraordinary situations, the output of `juju status` could show pending units that should have been removed when deleting a NS. In those situations, you can clean up VCA by following the procedure below:
@@ -440,7 +386,7 @@ juju resolved -m <NS_ID> <unit> --no-retry # You'll likely have to run it
The following page also shows [how to remove different Juju objects](https://docs.jujucharms.com/2.1/en/charms-destroy)
If juju gets in a corrupt state and you cannot run `juju status` or contact the juju controller, you might need to remove manually the controller and register again, making OSM aware of the new controller.
@@ -502,7 +448,7 @@ docker stack rm osm
docker stack deploy -c /etc/osm/docker/docker-compose.yaml osm
```
#### Slow deployment of charms
### Slow deployment of charms
You can make deployment of charms quicker by:
@@ -511,17 +457,54 @@ You can make deployment of charms quicker by:
- Preventing Juju from running `apt-get update && apt-get upgrade` when starting a machine: [Disable OS upgrades in charms](14-advanced-charm-development.md#disable-os-upgrades)
- Building periodically a custom image that will be used as base image for all the charms: [Custom base image for charms](14-advanced-charm-development.md#build-a-custom-cloud-image)
### Instantiation Errors
## Common instantiation errors
#### File juju_id_rsa.pub not found
### File juju_id_rsa.pub not found
-**ERROR**: `ERROR creating VCA model name 'xxxx': Traceback (most recent call last): File "/usr/lib/python3/dist-packages/osm_lcm/ns.py", line 822, in instantiate await ... [Errno 2] No such file or directory: '/root/.local/share/juju/ssh/juju_id_rsa.pub'`
-**CAUSE**: Normally a migration from release FIVE do not set properly the env for LCM
-**SOLUTION**: Ensure variable **OSMLCM_VCA_PUBKEY** is properly set at file `/etc/osm/docker/lcm.env`. The value must match with the output of this command `cat $HOME/.local/share/juju/ssh/juju_id_rsa.pub`. If not, add or change it. Restart OSM, or just LCM service with `docker service update osm_lcm --force --env-add OSMLCM_VCA_PUBKEY=""`
### NBI Errors
## Common issues whwn interacting with NBI
### SSL certificate problem
By default, OSM installer uses a self-signed certificate for HTTPS. That might lead to the error '_SSL certificate problem: self signed certificate_' on the client side. For testing environments, you might want to ignore this error just by using the appropriate options to skip certificate validation (e.g. `--insecure` for curl, `--no-check-certificate` for wget, etc.). However, for more stable setups you might prefer to address this issue by installing the appropriate certificate in your client system.
These are the steps to install NBI certificate on the client side (tested for Ubuntu):
1. Get the certificate file `cert.pem` by any of these means:
3. Add to the list of `/etc/hosts` a host called "nbi" with the IP address where OSM is running.
- It can be `localhost` if client and server are the same machine.
- For localhost, you would need to add (or edit) these lines:
```text
127.0.0.1 localhost nbi
OSM-ip nbi
```
4. Finally, for the URL, use the `nbi` as host name (i.e. <httts://nbi:9999/osm>).
- Do not use neither `localhost` nor 127.0.0.1.
- You can run a quick test with `curl` by:
```bash
curl https://nbi:9999/osm/version
```
#### Cannot login after migration to 6.0.2
### Cannot login after migration to 6.0.2
-**ERROR**: NBI always return "UNAUTHORIZED". Cannot login neither with UI nor with CLI. CLI shows error "`can't find a default project for this user`" or "`project admin not allowed for this user`".
-**CAUSE**: Normally after a migration to release 6.0.2 There is a slight incompatibility with users created from older versions.
If you are upgrading frequently your OSM installation, you might face that your disk is running out of space. The reason is that the previous dockers and docker images might be consuming some disk space. Running the following two commands should be enough to clear your docker setup:
```bash
docker system prune
docker image prune
```
If you are still experiencing issues with disk space, logs in one of the dockers could be the cause of your issue. Check the containers that are consuming more space (typically kafka-exporter)
```bash
du-sk /var/lib/docker/containers/* |sort -n
docker ps |grep <CONTAINER_ID>
```
Then, remove the stack and redeploy it again after doing a prune: