Pre-requisites:
- Have tenant admin role in your tenancy
- Have Openstack Application Credentials, you can request them here EWC - How to request Openstack Application Credentials.
User procedure
Start user procedure:
- Have an Ubuntu 22 VM ready in your tenancy or create a new temporary Ubuntu 22 VM from Morpheus
- plan: eo1.medium
- networks: private
- security group: ssh
- Create backup of the LDAP VM (See CreatebackupofaVM );
- Check the Operating System of your LDAP from Morpheus, Provisioning → Instances → select LDAP machine ;
- If your LDAP is rocky 8 based → jump to step 8.
- If your LDAP is centos7 based → continue to step 4.
- If your LDAP is rocky 8 based → jump to step 8.
- Create LDAP replica instance type to move from centos7 to rocky 8 (see MigratefromCentos7toRocky8);
- Switch IP interfaces between LDAPs using 'switch interfaces of two VMs' workflow in Morpheus (see SwitchInterfacesoftwoVMs);
- Update Morpheus (see UpdateMorpheus );
- Check everything is working fine (see Tests);
- Create LDAP replica instance type to move from rocky 8 to rocky 9 (see MigratefromRocky8toRocky9)
- Switch IP interfaces between LDAPs using 'switch interfaces of two VMs' workflow in Morpheus (see SwitchInterfacesoftwoVMs);
- Update Morpheus (see UpdateMorpheus );
- Check everything is working fine (see Tests);
- Delete old LDAP machine/s to free resources (see Delete a VM from Morpheus).
Tasks
Migrate from Centos7 to Rocky 8
Creating a new rocky 8 LDAP replica
- Login to Morpheus
- Go to Provisioning → Instances and click '+ADD'
- Select the LDAP replica Instance type
- Select a new name for the VM (e.g. ldap-rocky8) and click 'Next'
- Use the following inputs for the VM and then click 'Next' until the deployment starts:
- version: 8
- plan: eo1.medium
- networks: private
- security group: ldap
In case of errors during the provision of the replica for Rocky 8, please check ipacommandlineofWebUIaccessisdenied,withanHTTPerror401
Migrate from Rocky 8 to Rocky 9
Creating a new rocky 8 LDAP replica
- Login to Morpheus
- Go to Provisioning → Instances and click '+ADD'
- Select the LDAP replica Instance type
- Select a new name for the VM (e.g. ldap-rocky8) and click 'Next'
- Use the following inputs for the VM and then click 'Next' until the deployment starts:
- version: 9
- plan: eo1.medium
- networks: private
- security group: ldap
Create backup of a VM
- Go to an Ubuntu 22 VM and select 'Run Workflow'
- Select the 'Create Backup of a VM using Openstack Applications Credentials'
- Insert inputs and run the workflow where you provide:
- Name of the VM to backup
- Openstack Application Credentials ID and Secret
Switch Interfaces of two VMs
- Go to an Ubuntu 22 VM and select 'Run Workflow'
- Select the 'Switch Interfaces of two VMs using Openstack Applicaitons Credentials'
- Insert inputs and run the workflow where you provide:
- OLD VM in this case is the OLD LDAP machine name
- NEW VM in this case is the NEW LDAP machine name
- Security Group Name: ldap
- Openstack Application Credentials ID and Secret
Update Morpheus
- Login to Morpheus and change the value of the hostname for LDAP, going to Tools → Cypher:
- Delete the secret/ldap_hostname
- Use the '+ADD' to create a new secret
- Add KEY: secret/ldap_hostname and VALUE: NEW_LDAP_HOSTNAME
- Delete the secret/ldap_hostname
Tests
- ssh to ssh-proxy in your tenancy
- ssh using DNS to the new LDAP machine
- Run sudo ipactl status → verify the services are all up and running (if not, try sudo ipactl restart command)
- From Morpheus go to Provisioning → Instances and deploy a new machine to test the enrollment to LDAP DNS is working correctly with the new LDAP machine.
Known possible errors
ipa
command line of WebUI access is denied, with an HTTP error 401
You could identify this error during tests (e.g. running a ipa command) or enrollment of a machine into LDAP, after the migration from Centos7 to Rocky8.
Example error:
[root@replica-first ~]# ipa --verbose ipa: INFO: Connection to https://replica-first.coreservices.ewc/ipa/session/json failed with <ProtocolError for replica-first.coreservices.ewc/ipa/session/json: 401 Unauthorized> ipa: INFO: Connection to https://ldap.coreservices.ewc/ipa/session/json failed with [Errno -2] Name or service not known ipa: ERROR: cannot connect to 'any of the configured servers': https://replica-first.coreservices.ewc/ipa/session/json, https://ldap.coreservices.ewc/ipa/session/json
In order to fix this authentication issue:
- SSH to the current LDAP machine you have
- become root
- Run the following
python3 /usr/libexec/ipa/oddjob/org.freeipa.server.config-enable-sid --add-sids
- restart ipa
ipactl restart
- finally kinit with the LDAP admin user ( you can find it in Morpheus Cypher → secret/ipaadmin_username, password/ipaadmin and try to run ipa commands to verify the above error is no more there)
kinit <ldap-admin-user>
- Finish procedure for new rocky 8 replica
- replace the new LDAP IP with the IP of the interface of the old LDAP
ipa dnsrecord-mod HOSTED_ZONE ipa-ca --a-rec OLD_LDAP_IP ipa dnsrecord-mod HOSTED_ZONE NEW_LDAP_HOSTNAME --a-rec OLD_LDAP_IP
- replace the new LDAP IP with the IP of the interface of the old LDAP
Resource: https://access.redhat.com/solutions/7052125
DNA range issue
After the IPA Migration, especially from Centos7 to Rocky9, there might be still some possible errors, like the one below:
ipa: ERROR: Operations error: Allocation of a new value for range cn=posix ids,cn=distributed numeric assignment plugin,cn=plugins,cn=config failed! Unable to proceed.
There is a FreeIPA doc site related to this: https://www.freeipa.org/page/V3/Recover_DNA_Ranges.html
The fix for that error is the following command:
- Identify min and max range of IDs
ipa idrange-find
- Set the lower boundary to exclude every existing account (as of
ipa user-find | grep 'UID'
) - Assign the DNS range using ${min}-${max} identified in the previous steps
ipa-replica-manage dnarange-set $ldap_server ${min}-${max}
- Check the range that is used
ipa-replica-manage dnarange-show