-
Notifications
You must be signed in to change notification settings - Fork 999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #19325 - Adding VMware vSphere SCSI Controller ID Selection to volumes #4471
Conversation
Do not merge! This patch has not been tested yet. Can an existing organization member please verify this patch? |
2 similar comments
Do not merge! This patch has not been tested yet. Can an existing organization member please verify this patch? |
Do not merge! This patch has not been tested yet. Can an existing organization member please verify this patch? |
@sbernhard, thanks for your PR! By analyzing the history of the files in this pull request, we identified @ohadlevy, @timogoebel and @mmoll to be potential reviewers. |
There were the following issues with the commit message:
If you don't have a ticket number, please create an issue in Redmine. More guidelines are available in Coding Standards or on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
@sbernhard : Thanks. Could you please rebase this and squash it into a single commit? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sbernhard : Thanks. I left some comments inline. I'm not really convinced, this adds any actual value for customers as long as it's only possible to manage a single scsi controller with foreman. There is a PR open to fix this. #4366
@@ -24,3 +24,4 @@ | |||
"true", | |||
"false" %> | |||
<%= select_f f, :mode, compute_resource.disk_mode_types, :first, :last, { }, :class => "span5", :label => _("Disk mode"), :label_size => "col-md-2", :disabled => !new_host %> | |||
<%= select_f f, :controller_key, compute_resource.controller_ids, :first, :last, { }, :class => "span5", :label => _("SCSI Controller ID"), :label_size => "col-md-2" , :disabled => !new_host %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be :disabled => !new_vm
. Dito in the line above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some fields are with new_host and some with new_vm. I can change it to new_vm if you are sure that this is the right one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm positive new_vm
is the correct choice here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the current github develop branch there are 2 lines of code which are using "new_host" instead of "new_vm". It's the vmware name and the disk mode. Should I open a new redmine issue and fix both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that would be wonderful. Everything we can get into core will be greatly appreciated. We (read: I) renamed new_host
to new_vm
as 637da2f allows you to create a host in foreman on an existing vm. So the naming was wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See Redmine #19340
@@ -575,7 +594,6 @@ def vm_instance_defaults | |||
:memory_mb => 768, | |||
:interfaces => [new_interface], | |||
:volumes => [new_volume], | |||
:scsi_controller => { :type => scsi_controller_default_type }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm setting the default type in parse_args as its necessary to set the default controller type for all volumes and not only for one.
scsi_controllers = Hash.new | ||
args[:volumes_attributes].each do |k,v| | ||
Rails.logger.info("Will add #{v[:controller_key]} vmware controller with type #{scsi_controller_type}") | ||
scsi_controllers[v[:controller_key]] = {:type => scsi_controller_type, :key => v[:controller_key]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this support API requests where :controller_key
is not set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't tried that right now but from the fog-vsphere code I would say, yes.
end | ||
|
||
scsi_controllers = Hash.new | ||
args[:volumes_attributes].each do |k,v| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This gives me an NoMethodError: undefined method
each' for nil:NilClass` when trying to create a new vm though the UI.
There were the following issues with the commit message:
If you don't have a ticket number, please create an issue in Redmine. More guidelines are available in Coding Standards or on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
The main reason for this change is this (page 11): [cite] |
@sbernhard : Thanks. I am familiar with that document and that recommendation. That's one reason why we started with #4366. That PR allows a user to add more then one scsi controller to a VM and attach disks to the controllers. |
@timogoebel OK. Then we are working on the same issue from different directions I guess. :-) |
Can you then close http://projects.theforeman.org/issues/19325 please? |
@sbernhard : I'd prefer to keep the issue open as #4366 does not allow to actually change the scsi id of a controller. |
Do not merge! This patch has not been tested yet. Can an existing organization member please verify this patch? |
1 similar comment
Do not merge! This patch has not been tested yet. Can an existing organization member please verify this patch? |
Do not merge! This patch has not been tested yet. Can an existing organization member please verify this patch? |
Adding VMware vSphere SCSI Controller ID Selection to volumes