Adding backup option for disks and fixing issues with updating compute node when unneeded#364
Open
btoneill wants to merge 10 commits intotheforeman:masterfrom
Open
Adding backup option for disks and fixing issues with updating compute node when unneeded#364btoneill wants to merge 10 commits intotheforeman:masterfrom
btoneill wants to merge 10 commits intotheforeman:masterfrom
Conversation
Contributor
Author
|
I have cleared up the rubocop and js errors. I think it's all pushed properly. I'm new at doing this stuff thru GitHub so apologies on figuring out the process. |
Contributor
|
The tests are failing, can you please fix them. |
Manisha15
requested changes
Oct 17, 2024
| label={__('Backup')} | ||
| type="select" | ||
| value={hdd?.backup?.value} | ||
| options={ProxmoxComputeSelectors.proxmoxBackupsMap} |
Contributor
There was a problem hiding this comment.
Suggested change
| options={ProxmoxComputeSelectors.proxmoxBackupsMap} | |
| info={__('Enable/disable volume backup')} | |
| options={ProxmoxComputeSelectors.proxmoxBackupsMap} |
| </div> | ||
| <%= select_f f, :cache, proxmox_caches_map, :id, :name, { include_blank: true }, :label => _('Cache'), :label_size => "col-md-2" %> | ||
| <%= text_f f, :size, :class => "input-mini", :label => _("Size (GB)"), :label_size => "col-md-2", :disabled => !hard_disk %> | ||
| <%= checkbox_f f, :backup, :checked => (f.object.backup == '1' || f.object.backup.nil? ), :label => _('Backup'), :label_help => _('Enable/disable volume backup') %> |
Contributor
There was a problem hiding this comment.
you can remove this line as this is an obsolete file and will be removed in next version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added option for turning backup on/off from Foreman so you can keep some disks from being backed up. Otherwise if you set it on the Proxmox side a foreman update will change it back. Was unable to use a checkbox as the default for backup is a blank setting and the ActionPack stuff doesn't pass thru an unchecked checkbox. So had to make it a pull down option list.
Removed the mac address upcase change because it causes every update of a host in Foreman to cause an update of the MAC address in proxmox because foreman uses the mac address in the format of the host and this causes it to always change if they don't match
For some reason the code is setting the id of the network device for proxmox to be the network name the OS thinks it is. For example, OS is ens18 and proxmox is net0. The code forced ens18 to the compute_attributes which causes Foreman to always think an update needs to be done. Log for this in debug mode is "Scheduling compute instance update because id changed it's value from 'net0' (String) to 'ens18' (String)". This fixes it so it properly uses the net0 instead of getting the name of the OS network device.