Many setting are gone with upgrade from 3.9 to 3.10

Dear supporter,

When our foreman server was upgraded from 3.9 to 3.10, the upgrade was successful. But, after login, I realized hosts are all gone, except for foreman VM; and computer resource, hostgroup and subnet became empty.

Webhook, ansible, domain are good.
We have followed foreman up grade instruction since 3.3. But never seen setting gone before.

Below is my upgrade command, please help with correct my command or provide with possible alternative solution. Thank you


dnf upgrade -y
dnf update https://yum.theforeman.org/releases/3.10/el8/x86_64/foreman-release.rpm
https://yum.theforeman.org/katello/4.12/katello/el8/x86_64/katello-repos-latest.rpm
dnf module disable pulpcore
dnf module enable katello:el8
foreman-maintain service stop
dnf update -y
foreman-installer --scenario katello
reboot

BR
Tom Chien

I’ve moved your post to the “Support” category.

What you describe sounds like your database was reset, which clearly shouldn’t happen during an upgrade. Are you using the DB on the same system or external?

Hi @evgeni ,
we use internal DB from foreman installation.

Okay, let’s see if the data is really gone.

As root, can you run the following command?

# runuser -c 'echo "select id,name from hosts;" | psql foreman' postgres

Does it return more than one row?

Hi @evgeni ,
Please see below image.

  1. is the foreman server
  2. is foreman-proxy.
  3. it is vcenter

Okay. There are clearly systems missing.

Do you have a backup from before the upgrade?

Hi @evgeni ,
Yes, we use vmware snapshot to restore it.

Perfect!

Can you restore that (ideally as a second VM, so we can compare things if needed) and double check the command returns more hosts while still on 3.9?

1 Like

Yes, I cloned the restored VM. So we have 2 identical VMs at the point of original VM before upgrade.

Hi @evgeni ,
Yes, they both have same lines
10.42.27.115 is before upgrade (normal)
10.42.27.215 is after upgrade (failed)

image

But doesn’t this look like the hosts are already gone before the upgrade?

Hi @evgeni , this is a stage environment, and we only have 3 hosts in the stage environment. After stage upgrade verified, we will proceed to production. But after stage upgrade, only f#1 and #2 exist. #345 is gone.

Oh!
But wait, the SQL above shows 345 fine. So it is in the DB.

Is it maybe assigned to an org/location that you don’t see by default when you login?
Can you try selecting “Any Org” and “Any Location” at the top menu to see everything?

1 Like

Hi @evgeni , yes, you are right. I forgot to adjust location to any location. Sorry, this issue is caused by my overlook. We can close this ticket. Thank you very much.

Phew. Perfect!

2 Likes

Hi @evgeni , There is one more issue I found in upgrade.

Our hostgroup of MS_Windows/Systems/SJC1 is connected to the location of Systems/SJC1.
When creating VM, we should see all settings from hostgroup to be added, for example, “Deploy On”. But none of them are brought into the host creation items. I choose any location and organization this time

Could I have your advice? Thank you

pic1: hostgroup


pic2: location

pic3: Create Host

No idea, no.

But it’s probably best to start a new topic, so it doesn’t get burried.

1 Like