Question

How to fix HostID after OS upgrade

Hi I updated FreeBSD on a droplet (11.3 -> 12.1) and after rebooting my droplet become unavailable because of missed network config. In the /etc/rc.conf I found the following (in the Digital Ocean dynamic section):

...
defaultrouter=""
ifconfig_vtnet0="inet  netmask "
...

After fixing the gateway and IP/mask with actual values - everything works well. At least until next reboot. In the boot log (dmesg -a) I found the following:

...
DigitalOcean: current hostID **adbd6c77-xxx...**
DigitalOcean: expected hostID **d050c92d-yyy...**
DigitalOcean: resizing the disk...
vtbd0 recovering is not needed
vtbd0p3 resized
growfs: cannot find special device for /dev/gpt/rootfs
DigitalOcean: no need to resize rootfs
DigitalOcean: mount configdrive
could not determine starting sector, using very first session
DigitalOcean: applying droplet configuration
DigitalOcean: reading meta-data
eval: /usr/local/bin/jq: not found
DigitalOcean: hostname is set in /etc/rc.conf, skipping setting hostname
eval: /usr/local/bin/jq: not found
eval: /usr/local/bin/jq: not found
eval: /usr/local/bin/jq: not found
DigitalOcean: adding public IPv4 configuration
eval: /usr/local/bin/jq: not found
eval: /usr/local/bin/jq: not found
DigitalOcean: adding anchor ipv4 configuration
eval: /usr/local/bin/jq: not found
eval: /usr/local/bin/jq: not found
DigitalOcean: adding private IPv4 configration
eval: /usr/local/bin/jq: not found
eval: /usr/local/bin/jq: not found
eval: /usr/local/bin/jq: not found
DigitalOcean: adding IPv6 configuration
DigitalOcean: finished droplet configuration
DigitalOcean: re-starting networking
lo0: link state changed to UP
ifconfig: 'netmask' requires argument
ifconfig: 'prefixlen' requires argument
vtnet0: link state changed to UP
ifconfig: alias: bad value
...

So I suppose the reason is in broken hostID - the DO VM-host cannot set proper network config in /etc/rc.conf for droplet because of incorrect hostID. What should I do to fix this?


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
September 7, 2020
Accepted Answer

Hi there @Selin,

I think that the problem is that the jq command is missing and this is why you are getting the Bad values error.

You need to install the jq command. On FreeBSD you could do that with:

pkg install jq 

For any other operating systems you can take a look at the official documentation here:

https://stedolan.github.io/jq/download/

For more on how the jq command works you can take a look at this tutorial here on how to work with jq.

Hope that this helps! Regards, Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel