Blog

The packages have unmet dependencies on Ubuntu

As I mentioned in the post: https://nguyentrihai.com/?p=905, I reset the old Apache2 configs in the machine that I was running Devstack. However, it shows the following errors:

Depends: apache2-bin (= 2.4.18-2ubuntu3.9) but 2.4.29-1ubuntu4.2 is to be installed

I try to remove all apache packages, the other error appears:

Depends: apache2-bin (= 2.4.18-2ubuntu3.9) but it is not going to be installed

Turn out, when I run the Devstack before, the Ubuntu was 16.04, then I upgrade it to 18.04 but the repositories for installing Ubuntu packages are still old version.

Solution: Replace all contents of the file /etc/apt/sources.listwith the default content, like below:

Default sources.list (/etc/apt/sources.list) for Ubuntu 18.04 LTS:

deb http://archive.ubuntu.com/ubuntu bionic main restricted universe
deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe
deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu bionic partner

Update package lists and install missing dependencies:

# apt-get update
# apt-get -f install

Run Plesk installation / update / upgrade.

OpenStack Placement API did not start while installing Devstack

I used to run Devstack to develop the Tacker project for a while then I stopped. The problem is Placement API now separates from the Nova project. Therefore, while I try to install Devstack again, the “Placement API did not start” error happens.

The solution: As I asked in IRC chat of the placement project, we probably need to clean out old Apache2 configs if we are on a machine which was running Devstack before.

The first step is to stop any running instance of Apache2, because Apache2 will not be properly removed while it is running.

$ sudo service apache2 stop

Then uninstall Apache2 and its dependent packages. Use purge option instead of remove with apt-get command. The former option will try to remove dependent packages, as well as any configuration files created by them. In addition, use autoremove option as well, to remove any other dependencies that were installed with Apache2, but are no longer used by any other package.

$ sudo apt-get purge apache2*
$ sudo apt-get autoremove

Finally, check if there is any configuration files or manual pages belonging to Apache2, which are still not removed.

$ whereis apache2
apache2: /etc/apache2

In this example, /etc/apache2 directory still exists. Since this directory (as well as any configuration files in it) is no longer necessary, go ahead and remove it manually.

$ sudo rm -rf /etc/apache2 

Advanced VNF based on OpenWRT in Tacker

Abstract: By leveraging Network Function Virtualization (NFV), the communications service providers (CSPs) can provide a virtual customer premises equipment (vCPE) solution where multiple network services and functions are virtualized and run on the common hardware platform with lower costs than of physical hardware appliances. However, in the OpenStack Tacker-based vCPE system, the network services based on the OpenWrt image only enable the Firewall and Router. In this paper, we further develop the advanced OpenWrt-based network services such as Dynamic Host Configuration Protocol (DHCP), Domain Name System (DNS), Quality of service (QoS).

Demo: https://anda.ssu.ac.kr/~openwrt/

Full paper: [Link]

Citation:

Trinh Nguyen, Tri-Hai Nguyen, Myungsik Yoo, “Developing the VNFs for the vCPE system using OpenWrt”, The 28th Joint Conference on Communications and Information (JCCI 2018), 2-4 May 2018, Hidden Bay Hotel, Jeonnam, ROK.

VyOS-based VNF

Abstract: Network Function Virtualization (NFV) is a new concept that is shifting network functions from dedicated hardware appliances to software running on commodity hardware. By levering NFV, A communications service provider or CSP can provide a virtual customer Premises Equipment (vCPE) solution which is a method to deliver network services to enterprises by using software rather than dedicated hardware appliances. However, the minimum types of VNF are currently supported in the existing open-source NFV vCPE projects. Therefore, we propose a customized VyOS image that can be deployed as the VNF in NFV vCPE system with multi-function supported. The experiment is conducted in a Tacker-based vCPE system to show the feasibility of the provided VyOS image.

Demo: https://anda.ssu.ac.kr/~vyos/

Reference: Tri-Hai Nguyen, Myungsik Yoo, “A Comprehensive NFV vCPE System with VyOS-based VNF”,  2018 KICS Summer Joint Conference, 20-22 June 2018, Jeju-do, ROK. [Link]

Developing the Python Libs in DevStack

In Devstack, the Python packages/libs, e.g., python-tackerclient [1], tacker-horizon [2], are not easy to develop because normally they will be installed under python’s site-packages. Therefore, to easy for developing, we can install from the local environment and work on it:

1. Clone the repo of the project:

cd /opt/stack/
git clone git://git.openstack.org/openstack/python-tackerclient -b <branch>

2. Install:

cd python-tackerclient
sudo pip install -U -e .

3. Make changes.

Note: You need restart Apache server to work with tacker-horizon

sudo systemctl restart apache2

Customize the OpenWRT 15.05.1 for OpenStack Tacker

The OpenWRT is modified based on KVM OpenWRT 15.05.1 to be suitable for OpenStack Tacker.
The procedure is following as below:

cd ~
wget https://archive.openwrt.org/chaos_calmer/15.05.1/x86/kvm_guest/openwrt-15.05.1-x86-kvm_guest-combined-ext4.img.gz \
-O openwrt-x86-kvm_guest-combined-ext4.img.gz
gunzip openwrt-x86-kvm_guest-combined-ext4.img.gz

mkdir -p imgroot

sudo kpartx -av openwrt-x86-kvm_guest-combined-ext4.img

# Replace the loopXp2 with the result of above command, e.g., loop0p2
sudo mount -o loop /dev/mapper/loopXp2 imgroot
sudo chroot imgroot /bin/ash

# Set password of this image to blank, type follow command and then enter two times
passwd

# Set DHCP for the network of OpenWRT so that the VNF can be ping
uci set network.lan.proto=dhcp; uci commit
exit

sudo umount imgroot
sudo kpartx -dv openwrt-x86-kvm_guest-combined-ext4.img

A customized OpenWRT 15.05.1 that can be deployed as VNFs including Firewall, Router, NAT, DHCP, DNS, or QoS VNFs in OpenStack Tacker.

Download: https://anda.ssu.ac.kr/~openwrt/