Project

General

Profile

Bug #1743

Validation of name parameters always fails

Added by Sam Kottler almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
Rails
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Steps to reproduce:
1) Install a fresh version of Foreman from Git (or the nightly builds)
2) Try to add a new record of any type to uses the "name" parameter. Puppetclass, hostgroup, etc.
3) Get a validation error even when the field is valid.

https://skitch.com/skottler/egyct/1-root-ubuntu-12-usr-share-foreman-ssh

Setting the priority to immediate because this seems like a 1.0 release blocker.


Related issues

Related to Foreman - Bug #2393: Couple of models broken with audited 3.0.0Closed2013-04-10
Has duplicate Foreman - Bug #1748: When creating new hostgroup, the name is always removed and prevent to save the hostgroupDuplicate2012-07-12

Associated revisions

Revision 85cc156a (diff)
Added by Ohad Levy almost 7 years ago

fixes #1743 - auditing RC2 breaks foreman, forcing RC1 for now

History

#1 Updated by Michael Coulter almost 7 years ago

Observing same behaviour. Seen with 1.0-rc and nightly debs. Cranked log_level up to debug and this appears to be the culprit:

WARNING: Can't mass-assign protected attributes: architecture_ids, name, medium_ids, release_name, minor, ptable_ids, major, family

Looking around at the models, some already have attr_accessible declarations and some don't. I'm not sure how this is meant to work, and what actually provoked the breakage (i.e. is it a foreman related change, or better safety checks in rails).

#2 Updated by Ohad Levy almost 7 years ago

I wonder if this is only deb/ubuntu, I'll try to have a look, but i have a feeling the rails packages include a few more patches on top of the 3.0.15 release

#3 Updated by Ohad Levy almost 7 years ago

OK, I can reproduce, it seems a recent gem upgrade has been triggering this change, I'll try to narrow it down and find out which gem changes the behavior.

#4 Updated by Ohad Levy almost 7 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

#5 Updated by Sam Kottler almost 7 years ago

Cool! Thanks Ohad.

Do you think it makes sense to add a functional test to prevent this from happening again?

Also available in: Atom PDF