Project

General

Profile

Actions

Bug #12513

open

"Failed to cancel pending build for <FQDN>" when clicking "Cancel Build" button

Added by larry campbell about 9 years ago. Updated about 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
DNS
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Foreman appears to be checking if a PTR exists before a cancel build completes, however a PTR will exist because the previous Build command will have created the PTR record. This behavior seems to be new with 1.9.3, I do not remember having issues in 1.9.0 (my previous version) or any 1.8 or 1.7 versions.

Steps to reproduce:
- Create host in Foreman UI and click Build (if necessary to start Build)
- Ensure that a PTR is created for the host on the DNS reverse zone.
- Click the "Cancel Build" button

Expected failure:
A Red box stating "Failed to cancel pending build for <FQDN> shows up and the build is not cancelled.

Log info from /var/log/foreman/production:

Started GET "/hosts/host.example.com/cancelBuild" for 10.0.0.5 at 2015-11-17 17:06:36 -0600
2015-11-17 17:06:36 [app] [I] Processing by HostsController#cancelBuild as HTML
2015-11-17 17:06:36 [app] [I]   Parameters: {"id"=>"host.example.com"}
2015-11-17 17:06:36 [sql] [W] DNS PTR Records 10.1.1.173/host.example.com already exists
2015-11-17 17:06:36 [sql] [W] Failed to set Build on host.example.com: ["Conflict DNS PTR Records 10.1.1.173/host.example.com already exists"]
2015-11-17 17:06:36 [app] [I] Failed to save: Conflict DNS PTR Records 10.1.1.173/host.example.com already exists
2015-11-17 17:06:36 [app] [I] Redirected to https://foreman.example.com/hosts/host.example.com
2015-11-17 17:06:36 [app] [I] Completed 302 Found in 536ms (ActiveRecord: 28.1ms)
2015-11-17 17:06:36 [app] [I]

Workaround:
Manually delete the PTR to have the validation succeed.

Actions

Also available in: Atom PDF