Project

General

Profile

Bug #8587

hammer host enable build can be enabled also for unmanaged hosts

Added by Dominic Cleal about 6 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
Bugzilla link:
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:

Associated revisions

Revision dac16774 (diff)
Added by Adam Ruzicka almost 5 years ago

Fixes #8587 - Don't allow build for unmanaged hosts

History

#1 Updated by Dominic Cleal about 6 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)

#2 Updated by The Foreman Bot almost 5 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

#3 Updated by Adam Ruzicka almost 5 years ago

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

#4 Updated by Dominic Cleal almost 5 years ago

  • Legacy Backlogs Release (now unused) set to 136

Also available in: Atom PDF