The officially official Devuan Forum!

You are not logged in.

#1 2018-02-01 21:02:41

bobemoe
Member
From: UK
Registered: 2016-12-01
Posts: 30  

How to get Devuan running on Rackspace.

It's pretty straight forward. First create a new Debian Jessie server, ssh in and run the following standard method to upgrade to Devuan.

echo -e "deb http://auto.mirror.devuan.org/merged jessie main\ndeb http://auto.mirror.devuan.org/merged jessie-updates main\ndeb http://auto.mirror.devuan.org/merged jessie-security main" > /etc/apt/sources.list
apt-get update && apt-get install devuan-keyring -y --allow-unauthenticated
apt-get update
apt-get dist-upgrade -y
reboot

Congratulations! You now have Devuan running. Log back in and run the following to clean up:

apt-get purge systemd libsystemd0 -y
apt-get autoremove --purge -y
apt-get autoclean

Up until recently this was all that was needed, but nova-agent seem to have dropped support for init systems other than systemd. If you don't create the init script manually, nova-agent won't start on boot. This does not affect reboots of the VM, however if you image it and build another server from the image, on first boot it will not get its new IP address, and, although the build succeeds after an hour, it still will not have network access.

NOTE! The following is a bit of a ugly hack. I just took the startup line from the latest systemd service file and popped it into the start function of an old init.d script from before they were removed. It works, but I have not written the stop function. I'm not sure the implications of this. I hope to update to a better version soon. Feel free to post suggestions smile

Create the file /etc/init.d/nova-agent with the following:

#!/bin/sh

# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
#  Copyright (c) 2011 Openstack, LLC.
#  All Rights Reserved.
#
#     Licensed under the Apache License, Version 2.0 (the "License"); you may
#     not use this file except in compliance with the License. You may obtain
#     a copy of the License at
#
#          http://www.apache.org/licenses/LICENSE-2.0
#
#     Unless required by applicable law or agreed to in writing, software
#     distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#     WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#     License for the specific language governing permissions and limitations
#     under the License.
#
# nova-agent	Startup script for OpenStack nova guest agent
#
# RedHat style init header:
#
# chkconfig: 2345 15 85
# description: nova-agent is an agent meant to run on unix guest instances \
#              being managed by OpenStack nova.  Currently only works with \
#              Citrix XenServer for manipulating the guest through \
#              xenstore.
# processname: nova-agent
# pidfile: /var/run/nova-agent.pid
#
# LSB style init header:
#
### BEGIN INIT INFO
# Provides: Nova-Agent
# Required-Start: $remote_fs $syslog xe-linux-distribution
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start nova-agent at boot time
# Description: nova-agent is a guest agent for OpenStack nova.
### END INIT INFO

# Source function library.
if [ -e "/etc/rc.d/init.d/functions" ]
then
  . /etc/rc.d/init.d/functions
fi

do_start() {
  /usr/bin/nova-agent -o /var/log/nova-agent.log -l info
}

do_stop() {
  echo "TODO: fixme!"
}

SCRIPTNAME=$0

case "$1" in
  start)
    do_start
    ;;
  stop)
    do_stop
    ;;
  restart)
    do_stop
    do_start
    ;;
  *)
    echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2
    exit 3
    ;;
esac

Then add it to startup with:

chmod +x /etc/init.d/nova-agent
update-rc.d nova-agent defaults

Last edited by bobemoe (2018-02-01 22:58:40)

Offline

#2 2019-09-15 10:44:27

bobemoe
Member
From: UK
Registered: 2016-12-01
Posts: 30  

Re: How to get Devuan running on Rackspace.

After updating this to ASCII I found a 4-5min boot delay before SSH came up. This was in the boot log / emergency console:

Mon Dec 3 17:02:01 2018: [....] Starting Cloud service: cloud-initCloud-init v. 0.7.9 running 'init' at Mon, 03 Dec 2018 17:01:55 +0000. Up 10.30 seconds.
Mon Dec 3 17:02:01 2018: ci-info: +++++++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++++++
Mon Dec 3 17:02:01 2018: ci-info: +--------+------+----------------+---------------+-------+-------------------+
Mon Dec 3 17:02:01 2018: ci-info: | Device | Up | Address | Mask | Scope | Hw-Address |
Mon Dec 3 17:02:01 2018: ci-info: +--------+------+----------------+---------------+-------+-------------------+
Mon Dec 3 17:02:01 2018: ci-info: | lo: | True | 127.0.0.1 | 255.0.0.0 | . | . |
Mon Dec 3 17:02:01 2018: ci-info: | lo: | True | . | . | d | . |
Mon Dec 3 17:02:01 2018: ci-info: | eth0: | True | 134.213.210.74 | 255.255.255.0 | . | bc:76:4e:08:29:f1 |
Mon Dec 3 17:02:01 2018: ci-info: | eth0: | True | . | . | d | bc:76:4e:08:29:f1 |
Mon Dec 3 17:02:01 2018: ci-info: | eth1: | True | 10.182.67.40 | 255.255.224.0 | . | bc:76:4e:08:3d:89 |
Mon Dec 3 17:02:01 2018: ci-info: | eth1: | True | . | . | d | bc:76:4e:08:3d:89 |
Mon Dec 3 17:02:01 2018: ci-info: +--------+------+----------------+---------------+-------+-------------------+
Mon Dec 3 17:02:01 2018: ci-info: +++++++++++++++++++++++++++++++Route IPv4 info+++++++++++++++++++++++++++++++
Mon Dec 3 17:02:01 2018: ci-info: +-------+---------------+---------------+---------------+-----------+-------+
Mon Dec 3 17:02:01 2018: ci-info: | Route | Destination | Gateway | Genmask | Interface | Flags |
Mon Dec 3 17:02:01 2018: ci-info: +-------+---------------+---------------+---------------+-----------+-------+
Mon Dec 3 17:02:01 2018: ci-info: | 0 | 0.0.0.0 | 134.213.210.1 | 0.0.0.0 | eth0 | UG |
Mon Dec 3 17:02:01 2018: ci-info: | 1 | 10.176.0.0 | 10.182.64.1 | 255.240.0.0 | eth1 | UG |
Mon Dec 3 17:02:01 2018: ci-info: | 2 | 10.182.64.0 | 0.0.0.0 | 255.255.224.0 | eth1 | U |
Mon Dec 3 17:02:01 2018: ci-info: | 3 | 10.208.0.0 | 10.182.64.1 | 255.240.0.0 | eth1 | UG |
Mon Dec 3 17:02:01 2018: ci-info: | 4 | 134.213.210.0 | 0.0.0.0 | 255.255.255.0 | eth0 | U |
Mon Dec 3 17:02:01 2018: ci-info: +-------+---------------+---------------+---------------+-----------+-------+
Mon Dec 3 17:02:01 2018: 2018-12-03 17:01:55,639 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [0/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (
Mon Dec 3 17:02:01 2018: 2018-12-03 17:01:56,645 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [1/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (
Mon Dec 3 17:02:01 2018: 2018-12-03 17:01:57,650 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [2/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (
Mon Dec 3 17:02:01 2018: 2018-12-03 17:01:58,655 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [3/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (
Mon Dec 3 17:02:01 2018: 2018-12-03 17:01:59,660 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [4/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (
Mon Dec 3 17:02:01 2018: 2018-12-03 17:02:00,665 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [5/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (
Mon Dec 3 17:03:05 2018: 2018-12-03 17:02:02,677 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [7/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (
Mon Dec 3 17:03:05 2018: 2018-12-03 17:02:04,683 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [9/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (
Mon Dec 3 17:03:05 2018: 2018-12-03 17:02:06,690 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [11/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:03:05 2018: 2018-12-03 17:02:08,697 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [13/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:03:05 2018: 2018-12-03 17:02:10,703 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [15/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:03:05 2018: 2018-12-03 17:02:13,712 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [18/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:03:05 2018: 2018-12-03 17:02:16,720 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [21/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:03:05 2018: 2018-12-03 17:02:19,727 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [24/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:03:05 2018: 2018-12-03 17:02:22,734 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [27/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:03:05 2018: 2018-12-03 17:02:25,741 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [30/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:03:05 2018: 2018-12-03 17:02:29,749 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [34/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:03:05 2018: 2018-12-03 17:02:33,773 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [38/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:03:06 2018: 2018-12-03 17:02:37,781 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [42/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:03:06 2018: 2018-12-03 17:02:41,789 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [46/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:03:06 2018: 2018-12-03 17:02:45,793 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [50/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:03:06 2018: 2018-12-03 17:02:50,803 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [55/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:03:06 2018: 2018-12-03 17:02:55,808 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [60/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:03:06 2018: 2018-12-03 17:03:00,822 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [65/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:04:22 2018: 2018-12-03 17:03:05,832 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [70/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:04:22 2018: 2018-12-03 17:03:10,845 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [75/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:04:22 2018: 2018-12-03 17:03:16,859 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [81/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:04:22 2018: 2018-12-03 17:03:22,869 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [87/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:04:22 2018: 2018-12-03 17:03:28,880 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [93/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:04:22 2018: 2018-12-03 17:03:34,890 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [99/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:04:22 2018: 2018-12-03 17:03:40,901 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [105/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:04:22 2018: 2018-12-03 17:03:47,919 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [112/120s]: request error [HTTPConnectionPool(host='134.213.210.1', port=80): Max retries exceeded with url: /latest/meta-data/instance-id
Mon Dec 3 17:04:22 2018: 2018-12-03 17:03:54,930 - url_helper.py[WARNING]: Calling 'http://134.213.210.1/latest/meta-data/instance-id' failed [119/120s]: unexpected error [Attempted to set connect timeout to 0.0, but the timeout cannot be set to a value less than or equal to 0.]
Mon Dec 3 17:04:22 2018: 2018-12-03 17:04:01,938 - DataSourceCloudStack.py[CRITICAL]: Giving up on waiting for the metadata from ['http://134.213.210.1/latest/meta-data/instance-id'] after 126 seconds
Mon Dec 3 17:05:12 2018: 2018-12-03 17:04:52,009 - url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [50/120s]: request error [HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /2009-04-04/meta-data/
Mon Dec 3 17:06:02 2018: 2018-12-03 17:05:43,061 - url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [101/120s]: request error [HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /2009-04-04/meta-data
Mon Dec 3 17:06:02 2018: 2018-12-03 17:06:01,082 - url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [119/120s]: request error [HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /2009-04-04/meta-data
Mon Dec 3 17:06:02 2018: 2018-12-03 17:06:02,083 - DataSourceEc2.py[CRITICAL]: Giving up on md from ['http://169.254.169.254/2009-04-04/meta-data/instance-id'] after 120 seconds
Mon Dec 3 17:06:02 2018: ^[[?25l^[[?1c^[7^[[1G[^[[32m ok ^[[39;49m^[8^[[?25h^[[?0c.
Mon Dec 3 17:06:02 2018: [....] Starting OpenBSD Secure Shell server: sshd^[[?25l^[[?1c^[7^[[1G[^[[32m ok ^[[39;49m^[8^[[?25h^[[?0c.
Mon Dec 3 17:06:03 2018: [....] Starting Cloud service: cloud-initCloud-init v. 0.7.9 running 'modules:config' at Mon, 03 Dec 2018 17:06:02 +0000. Up 257.74 seconds.
Mon Dec 3 17:06:03 2018: ^[[?25l^[[?1c^[7^[[1G[^[[32m ok ^[[39;49m^[8^[[?25h^[[?0c.

After chatting to rackspace I confirmed that it was safe to disable these services:

This is an issue with cloud-init and the recent update you did. Since we do not use a remote source within cloud-init, it is timing out when it first starts the cloud-init service. Disabling the services you've disabled will not cause any future issues with this server.

update-rc.d cloud-config disable
update-rc.d cloud-final disable
update-rc.d cloud-init disable
update-rc.d cloud-init-local disable

Boot times have now returned to normal smile

Offline

#3 2021-02-19 17:28:37

tlathm
Member
Registered: 2017-11-25
Posts: 91  

Re: How to get Devuan running on Rackspace.

I figured I'd add to this old post to report my recent experience with this. I've been able to convert a Rackspace Debian Buster to Devuan Beowulf successfully, and wanted to outline what I did. For the most part is mostly just involved converting the original VM based on this:

https://www.devuan.org/os/documentation … owulf.html

For the nova-agent I used your init script above and enabled it with update-rc.d...thanks for that! Seems to be fine and, given my understanding of what that does I really doubt that it's lack of any "stop" functionality makes any difference. I also disabled those cloud services.

One additional thing I did was to get the Rackspace driveclient working. We downloaded and installed that, but just as with the nova-agent, they had no traditional init script. I was able to come up with this one which seems to work fine, and it appears that backups are working OK:

#!/bin/sh
### BEGIN INIT INFO
# Provides:          Rackspace Backup Agent
# Required-Start:    networking
# Required-Stop:     networking
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Rackspace Backup Agent
# Description:       Rackspace Backup Agent
### END INIT INFO

# Using the lsb functions to perform the operations.
. /lib/lsb/init-functions

export HOME=/root

PIDFILE=/var/run/driveclient.pid

case "$1" in
    start)
        log_begin_msg "Starting Rackspace Backup Agent..."
        start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --exec /usr/local/bin/driveclient -- --daemon
        log_end_msg $?
        ;;
    stop)
        log_begin_msg "Stopping Rackspace Backup Agent..."
        start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
        log_end_msg $?
        ;;
    restart)
        $0 stop
        sleep 1
        $0 start
        ;;
    status)
        if [ -e $PIDFILE ]; then
            status_of_proc -p $PIDFILE driveclient "Rackspace Backup Agent Service" && exit 0 || exit $?
        else
            log_success_msg "Rackspace Backup Agent Service is stopped"
            exit 3
        fi
        ;;
    *)
        log_success_msg "Usage: /etc/init.d/driveclient {start|stop|restart|status}"
        exit 1
esac

All seems to be working great. Rackspace without systemd lives!

Tom

Offline

Board footer