Bug 1386074 - error saving power settings multiple times on system page: "System access policy not specified"
Summary: error saving power settings multiple times on system page: "System access pol...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: web UI
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: 24.3
Assignee: Dan Callaghan
QA Contact: Dan Callaghan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-18 04:33 UTC by matt jia
Modified: 2017-05-30 07:08 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-05-30 07:08:05 UTC
Embargoed:


Attachments (Terms of Use)

Description matt jia 2016-10-18 04:33:16 UTC
Description of problem:

Sometimes I hit 'BAD REQUEST: System access policy not specified' when saving the power settings on the system page.

Version-Release number of selected component (if applicable):

23

How reproducible:

Easy

Steps to Reproduce:
1. click 'Add' button to create a new system on the systems page
2. fill in the essentials first
3. fill in the power settings 
4. click on the "Access Policy" Tab
5. click on the "Power Settings" back to the power setting form
6. update the power settings and save the form

Actual results:

Can't save the form with the error "BAD REQUEST: System access policy not specified"

Expected results:

The form should be saved successfully.

Comment 1 Dan Callaghan 2017-04-20 05:01:52 UTC
Okay, got it...

The steps to reproduce are actually shorter:

1. Add a new system, fill out arch and lab controller on Essential tab
2. Go to power settings tab and fill in some settings, click Save Changes
<-- this step works, but the server response has "id": null which now tricks Backbone into thinking the system model isNew()
3. Change the power settings and Save Changes again
<-- this step breaks, because Backbone tries to POST the entire model which does not include some necessary attributes because our JSON model for system is an ugly mess

We are actually returning bogus "id" values even when they are not null -- it is using the id of the power row instead of the system row, although it doesn't affect anything normally since we identify systems by FQDN in the API instead of by id. It's only an issue when the server gives back null as the id.

Comment 2 Dan Callaghan 2017-04-20 05:50:31 UTC
https://gerrit.beaker-project.org/5673

Comment 5 Dan Callaghan 2017-05-30 07:08:05 UTC
Beaker 24.3 has been released.


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