Dell - Internal Use - Confidential
Not being able to change attributes that are not writable is a feature, not a 
bug.  By design, crowbar will only allow changes to attribs that have a schema 
associated with them - the attribs are provided to the jigs unchanged, and we 
must make sure that they are in a format that the underlying jig will 
understand, and that format is unique to each attrib. We have an outstanding 
task to go through the attribs and add validation schema to attribs that we 
want to allow changes to via the API and the UI, but I have only been doing 
that for attribs that we have needed to change to test the features we have 
actively been working on.

The rules for writing schema for an attrib are here: 
https://github.com/opencrowbar/core/blob/master/doc/development-guides/model/attrib.md.

From: crowbar-bounces On Behalf Of Bovee, Justin
Sent: Monday, March 31, 2014 10:05 PM
To: Hirschfeld, Rob; crowbar
Subject: Re: [Crowbar] Crowbar Deployment

One of the other things I found is I am unable to properly set values that have 
been set not writable.

For example, the ntp_servers value

[root@crowbar01 barclamps]# /opt/opencrowbar/core/bin/crowbar nodes get 
crowbar01.okcstorage.local attrib ntp_servers
{
  "id": 42,
  "barclamp_id": 9,
  "role_id": 28,
  "name": "ntp_servers",
  "description": "Addresses of the NTP servers to use for cluster-wide time 
synchronization",
  "writable": false,
  "schema": null,
  "order": 10000,
  "map": "crowbar/ntp/servers",
  "created_at": "2014-04-01T02:26:48.795Z",
  "updated_at": "2014-04-01T02:26:48.796Z",
  "value": null
}

If I try and set this value in the gui, I get the following error messages in 
production.log
014-03-31 21:47:21.339 [31688] [INFO ] Started PUT "/api/v2/nodes/1/attribs/42" 
for ::ffff:127.0.0.1 at 2014-03-31 21:47:21 -0500
2014-03-31 21:47:21.342 [31688] [INFO ] Processing by AttribsController#update 
as JSON
2014-03-31 21:47:21.342 [31688] [INFO ] Parameters: {"value"=>"10.14.183.31", 
"version"=>"v2", "node_id"=>"1", "id"=>"42"}
2014-03-31 21:47:21.342 [31688] [WARN ] Can't verify CSRF token authenticity
2014-03-31 21:47:21.349 [31688] [ERROR] EXCEPTION: Attrib ntp_servers is 
read-only
2014-03-31 21:47:21.349 [31688] [ERROR] BACKTRACE:

Backtrace: http://pastebin.com/C2KFeXh3

If I do it from the command line.
[root@crowbar01 barclamps]# /opt/opencrowbar/core/bin/crowbar nodes set 
crowbar01.okcstorage.local attrib ntp_servers to '{"value": "10.14.183.31"}'
{
  "message": "Attrib ntp_servers is read-only",
  "backtrace": [

Backtrace: http://pastebin.com/WTjWzMps

I get the same values when I try and edit other options that writable is false.

For example, Victor Lowther was awesome and added a schema for external servers 
but I am unable to edit the values because

[root@crowbar01 barclamps]# /opt/opencrowbar/core/bin/crowbar nodes get 
crowbar01.okcstorage.local attrib dns_servers
{
  "id": 40,
  "barclamp_id": 8,
  "role_id": 25,
  "name": "dns_servers",
  "description": "DNS servers that all Crowbar clients should use",
  "writable": false,
  "schema": null,
  "order": 10000,
  "map": "crowbar/dns/nameservers",
  "created_at": "2014-04-01T02:26:48.593Z",
  "updated_at": "2014-04-01T02:26:48.595Z",
  "value": [
    "fc63:3746:5b92:1:63f3:9fc5:1e49:f5f6",
    "192.168.124.10"
  ]
}

Any assistance would be greatly appreciated.  If there is anything I can do to 
help the community, please let me know.  Thank you!

Justin Bovee
Master Engineer, Storage
Dell | Enterprise Support Services
Office Number: (512) 728-6035 ext. 7239536
M-F (8:00am - 5:00pm CST)
How am I doing? Email my manager 
richard_lea...@dell.com<mailto:richard_lea...@dell.com> with any feedback


_______________________________________________
Crowbar mailing list
Crowbar@dell.com
https://lists.us.dell.com/mailman/listinfo/crowbar
For more information: http://crowbar.github.com/

Reply via email to