Project

General

Profile

Feature #168

Make HOSTS fields optional when using "unattended"

Added by Marcello de Sousa almost 9 years ago. Updated about 8 years ago.

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

Description

When using foreman with existing non-standard (legacy) machines and leaving "unattended = true" to use it for unattended installs for new machines, you get an error if you try to assign classes or groups and don't select a "Ptable" template.

The error is:
"Ptable Cant be blank unless a custom partition has been defined"

To manage this in a mixed environment I suggest not making the fields mandatory, but maybe just give a warning or confirmation saying that the fields are not completely filled up.

Associated revisions

Revision c9fff7c1 (diff)
Added by Paul Kelly about 8 years ago

Fixes #168 - optional unattended settings

Revision 375303e4 (diff)
Added by Paul Kelly about 8 years ago

refs #168 - optional fields were wrong

When creating a new host and the host was empty then the optional
fields were not shown in the following edit page

History

#1 Updated by Ohad Levy almost 9 years ago

  • Target version deleted (0.1-4)

I agree this is a useful feature, I'll have to investigate how to implement it.

#2 Updated by Ohad Levy almost 9 years ago

  • Target version set to 0.1-5

ok, I've found a way to do it, I'll start working on towards the following release

#3 Updated by Paul Kelly over 8 years ago

  • Status changed from New to Assigned
  • Assignee changed from Ohad Levy to Paul Kelly

I have implemented a mechanism for hiding and revealing the unattended section in the gui and using this to de/activate the relevant validation checks. However when testing I found that I was not able to find a scenario in which this problem could occur.

If a legacy host has been imported via the rake tasks then all host fields are populated except the media, ptable, root password and serial. If this host then requires a new class or group then this is accessed via the edit page. The edit page will populate the ptable field unless the operating system of the host does not have any partition tables defined for it. In this case it might be more sensible to change the error message to "Ptable Cant be blank unless a custom partition has been defined\nEnsure that operatingsystem XXX has at least one partition table defined." Alternatively, a custom validation could be created that could distinguish between these to situations.

Marcello: if you have access to a current development installation, could you confirm that this problem is still present? Could you also describe how your host entries were created? If you created them whilst unattended => false and then switched to using unattended => true I would expect to see more errors as mac is not set.

#4 Updated by Paul Kelly over 8 years ago

  • Branch set to feature/168-optional-fields

Marcello: I think that I understand the problem now so no need to reply.

Rebased.
Tests pass

#5 Updated by Ohad Levy over 8 years ago

  • Target version changed from 0.1-5 to 0.1-6

bumped to next version

#6 Updated by Paul Kelly over 8 years ago

  • Status changed from Assigned to Ready For Testing

Rebased and passes tests

#7 Updated by Ohad Levy over 8 years ago

Paul Kelly wrote:

Rebased and passes tests

as its been a long time since we reviewed this, what is the change in behavior? (that we'll know to update the release notes as well).

#8 Updated by Paul Kelly about 8 years ago

In an installation running with unattended enabled there may be hosts that have been imported but you do not wish to manage their build cycle.

When a host edited then it is marked as being managed if it has an architecture, an OS and either a disk or ptable value. (When a host is imported then the ptable is not set.) When this host is edited then the unattended section is not rendered, so any value in that section is not updated. When these values are applied to the host object then the validations notice that the host is not managed and do not enforce the presence of a ptable.

#9 Updated by Paul Kelly about 8 years ago

rebased
tested

#10 Updated by Paul Kelly about 8 years ago

Rebased and tested

#11 Updated by Paul Kelly about 8 years ago

  • % Done changed from 0 to 100

#12 Updated by Ohad Levy about 8 years ago

  • Status changed from Ready For Testing to Closed

#13 Updated by Paul Kelly about 8 years ago

  • Status changed from Closed to Ready For Testing
  • Branch changed from feature/168-optional-fields to feature/168-optional-fields-extras

The edit page after an empty create page looks wrong
The alerts enabled and host owner would look better below the comment box
Note the branch name change above

#14 Updated by Paul Kelly about 8 years ago

more formatting goodness added

#15 Updated by Ohad Levy about 8 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF