Smart Server with Internal Storage and Dedicated Backup Server fails to build
A new Smart Server with Internal Storage cannot be build when there is a Dedicated Backup Server present.
OnApp 3.2.x 3.3.x
This occurs because the cloud is trying to provision from the backup server, but the local storage on the smart server cannot be seen from the backup server. We will need to allow the control server to provision the hypervisor.
So that we can provision smart servers from the control panel we will need to add a new record into the templates which will allow it to do so. We will copy the first template, rename the label, remove the backup_server_id and set smart_server to be 0.
First, we will need to insert the new record. This needs to be done inside of MySQL CLI
insert into templates (label, created_at, version, file_name, operating_system, operating_system_distro, allowed_swap, state, checksum, allow_resize_without_reboot, min_disk_size, template_size, operating_system_arch, operating_system_edition, operating_system_tail, allowed_hot_migrate, virtualization, disk_target_device, min_memory_size, ext4, smart_server, baremetal_server) select label, created_at, version, file_name, operating_system, operating_system_distro, allowed_swap, state, checksum, allow_resize_without_reboot, min_disk_size, template_size, operating_system_arch, operating_system_edition, operating_system_tail, allowed_hot_migrate, virtualization, disk_target_device, min_memory_size, ext4, smart_server, baremetal_server from templates where id=[ORIGINAL_TEMPLATE_ID];
At this point there will be a new template in the table. You should check the ID for this as we will be using it in the next few steps.
select id, label from templates where label=(select label from templates where id=[ID_OF_ORIGINAL_TEMPLATE]) and id != [ORIGINAL_TEMPLATE_ID];
This should show you the ID and label for the new template you've just created(remember these), unless you have a template that shared the same label as the first one, which it should not. Now that we have this, we can update the table to set the OLD template to not be a smart server template, then remove the backup_server_id, and update the label of the NEW template.
The old template should be modified as such:
update templates set smart_server=0 where id=[ORIGINAL_TEMPLATE_ID];
The new template should be modified as such(make sure you replace TEMPLATE_LABEL with the original label the template had, then append Smart Server Only and NEW_TEMPLATE_ID with the id you got from the select statement):
update templates set backup_server=NULL, label="[TEMPLATE_LABEL] Smart Server Only" where id=[NEW_TEMPLATE_ID];
Once this is done we now need to copy the templates over to the control server so it will be able to provision correctly
scp root@[BACKUP_SERVER]:/onapp/templates/[TEMPLATE_FILE_NAME] /onapp/templates/
After that we can SSH to the hypervisor and check that the /onapp/templates directory contains the template.
You may have to create the volume group on the hypervisor to create the data store before you're able to boot it correctly, and Smart Servers also require that IOMMU is enabled in the BIOS.