Bug 1335594 - Volume bootable checkbox broken in compute profiles in 1.11.0
Summary: Volume bootable checkbox broken in compute profiles in 1.11.0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Marek Hulan
QA Contact: Roman Plevka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-12 15:04 UTC by Tom McKay
Modified: 2019-08-12 14:03 UTC (History)
6 users (show)

Fixed In Version: foreman-1.11.0.37-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:24:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 14481 0 None None None 2016-06-07 13:05:38 UTC

Description Tom McKay 2016-05-12 15:04:50 UTC
Hi,

So in 1.11.0, when you add a new compute profile, or edit an existing one.

If you add a volume, the "Bootable" checkbox cannot be clicked.

In fact, if you edit an existing one, and click the checkbox, the checkbox will be unchecked, and then it cannot be checked anymore. 

I could fix this temporarily, by manually editing the HTML on the rendered GUI page, and then when I submit, the JSON request contained the "bootable" flag.

Comment 1 Tom McKay 2016-05-12 15:04:53 UTC
Created from redmine issue http://projects.theforeman.org/issues/14481

Comment 3 Marek Hulan 2016-06-07 12:28:04 UTC
Created redmine issue http://projects.theforeman.org/issues/15324 from this bug

Comment 4 Bryan Kearney 2016-06-07 14:16:28 UTC
Upstream bug component is WebUI

Comment 5 Bryan Kearney 2016-06-07 14:16:30 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/14481 has been closed

Comment 6 Roman Plevka 2016-06-28 13:39:19 UTC
on sat6.2.0 snap17.0

The radio button can't be unchecked once clicked. Is this a desired behavior?

Comment 7 Ohad Levy 2016-07-05 14:14:21 UTC
Roman: yes - you need at least one bootable volume, if you have multiple volumes you can toggle between them.

Comment 8 Roman Plevka 2016-07-18 11:53:36 UTC
(In reply to Ohad Levy from comment #7)
> Roman: yes - you need at least one bootable volume, if you have multiple
> volumes you can toggle between them.

In that case, it should mark the 'bootable' radio box for the first added volume by default.
right now, when you create a brand new profile, there are no volumes. when you add one, the bootable radio is unchecked by default. Saving a profile like this won't post 'bootable' attribute, and API is even happy with that:


$ curl -ku rplevka:changeme https://my-precious.com/api/v2/compute_profiles/5 | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   650    0   650    0     0    657      0 --:--:-- --:--:-- --:--:--   657
{
  "created_at": "2016-07-18 11:51:02 UTC",
  "updated_at": "2016-07-18 11:51:02 UTC",
  "id": 5,
  "name": "foo_cp_1",
  "compute_attributes": [
    {
      "id": 2,
      "name": "1 Cores and 256 MB memory",
      "compute_resource_id": 11,
      "compute_resource_name": "RHEV",
      "compute_profile_id": 5,
      "compute_profile_name": "foo_cp_1",
      "vm_attrs": {
        "cluster": "00000001-0001-0001-0001-00000000022f",
        "template": "",
        "cores": "1",
        "memory": "268435456",
        "volumes_attributes": {
          "new_1468842671925": {
            "size_gb": "",
            "storage_domain": "af918214-e6b2-4a01-a960-73dbc06a7073",
            "id": "",
            "preallocate": "0"
          },
          "new_1468842674324": {
            "size_gb": "",
            "storage_domain": "af918214-e6b2-4a01-a960-73dbc06a7073",
            "id": "",
            "preallocate": "0"
          }
        }
      }
    }
  ]
}

FailedQA (sat6.2. snap20.2)

Comment 9 Ohad Levy 2016-07-18 11:55:29 UTC
The original bug was fixed, what you are suggesting is and additional RFE, please open it as a new one instead of failing this one.

Comment 10 Roman Plevka 2016-07-18 12:05:08 UTC
(In reply to Ohad Levy from comment #9)
> The original bug was fixed, what you are suggesting is and additional RFE,
> please open it as a new one instead of failing this one.

I can report the API part as a standalone bug, but one way or another, you still got to fix the radio button.

Comment 11 Ohad Levy 2016-07-18 12:28:46 UTC
It is allowed to create a non bootable volume, it is very useless (e.g. the vm won't really boot / provision).

AFAIR you'll get validation errors in the UI if you don't have at least one bootable volume. asking mhulan to double check.

Comment 12 Bryan Kearney 2016-07-27 11:24:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1501

Comment 13 Marek Hulan 2016-08-08 12:16:23 UTC
Sorry for late answer. There's no validation for compute profile, which makes sense to me. Compute profile does not have to force which storage will be marked bootable in host form. User can choose one just before provisioning. Compute profile is just a template. If user sets one storage to be bootable, it's propagated into host form.

The fact we don't have such validation in host form is separate issue. There I can understand the argument that it is quite useless to create host without bootable storage. If you want to follow up on that, please create a new BZ. I don't see such request in upstream/downstream so far.


Note You need to log in before you can comment on or make changes to this bug.