Project

General

Profile

Actions

Bug #8587

closed

hammer host enable build can be enabled also for unmanaged hosts

Added by Dominic Cleal almost 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1170696
Description of problem:
It is possible to enable build also for hosts that are not managed. The result is then a no-op, because the PXE templates are not generated.

This behaviour is inconsistent with the UI, that where you cannot click the Build button when the host is not Managed. Also in the situation of enabling build without managed shows in the UI that the node is in Building status, but you are not allowed to view the templates either, these show an error that the host is not managed.

hoiroot@li-lc-1017:~$ sudo -u hoici hammer -c /opt/hoici/etc/hammer-hoici.yaml host update --name li-lc-1014.hag.hilti.com --managed no
Host updated

hoiroot@li-lc-1017:~$ ls -l /var/lib/tftpboot/pxelinux.cfg/
total 16
-rw-r--r-- 1 foreman-proxy foreman-proxy 12361 Dec  4 15:22 default

hoiroot@li-lc-1017:~$ sudo -u hoici hammer -c /opt/hoici/etc/hammer-hoici.yaml host update --name li-lc-1014.hag.hilti.com --build no
Host updated

hoiroot@li-lc-1017:~$ sudo -u hoici hammer -c /opt/hoici/etc/hammer-hoici.yaml host update --name li-lc-1014.hag.hilti.com --build yes
Host updated

hoiroot@li-lc-1017:~$ ls -l /var/lib/tftpboot/pxelinux.cfg/
total 16
-rw-r--r-- 1 foreman-proxy foreman-proxy 12361 Dec  4 15:22 default

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

How reproducible:

Steps to Reproduce:
1. Use the hammer to enable build as shown above
2.
3.

Actual results:

Expected results:
Give an Error that enabling build is only allowed for Managed hosts.

Additional info:

Actions #1

Updated by Dominic Cleal almost 10 years ago

  • Subject changed from hammer host enable build can be enable also for unmanaged hosts to hammer host enable build can be enabled also for unmanaged hosts
  • Description updated (diff)
  • Category set to API
  • Assignee deleted (Bryan Kearney)
Actions #2

Updated by The Foreman Bot over 8 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Adam Ruzicka
  • Pull request https://github.com/theforeman/foreman/pull/3327 added
Actions #3

Updated by Adam Ruzicka over 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #4

Updated by Dominic Cleal over 8 years ago

  • Translation missing: en.field_release set to 136
Actions

Also available in: Atom PDF