Bug 1110383

Summary: hammer cli associates DNSproxy to subnet & domain even when sat6/capsule is not configured for DNSproxy
Product: Red Hat Satellite Reporter: Kedar Bidarkar <kbidarka>
Component: Foreman ProxyAssignee: Tomas Strachota <tstrachota>
Status: CLOSED ERRATA QA Contact: Kedar Bidarkar <kbidarka>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.3CC: bbuckingham, cwelton, dcleal
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/6241
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 09:09:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kedar Bidarkar 2014-06-17 14:18:53 UTC
Description of problem:
hammer cli allows association of DNS proxy to subnet and domain even when the sat6/capsule is not configured to support the DNS with katello-installer.

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

How reproducible:
always

Steps to Reproduce:
1. configure the sat6box's capsule without DNS support [this would be desirable when DNS is being handled by IPA server - while working with REALM Integration.] 
2. Try creating a subnet and domain with the below command,

 hammer domain create --name "$DOMAIN" --dns-id "$PROXY_ID"
hammer subnet create --name "$SUBNET_NAME" --network "$SUBNET_IP" --mask "$SUBNET_MASK" --dns-id "$PROXY_ID" --dhcp-id "$PROXY_ID" --tftp-id "$PROXY_ID" --domain-ids "$DOMAIN_ID"

Actual results:
subnet and domain creation accepts the --dns-id even when DNSproxy is not configured via the katello-installer

Expected results:
subnet and domain creation should not accept the --dns-id when DNSproxy is not configured via the katello-installer


Additional info:

Comment 2 Kedar Bidarkar 2014-06-17 15:47:24 UTC
[root@xxxx provision]# hammer capsule info --name xxxx.redhat.com
Id:         1
Name:       dhcp207-235.lab.eng.pnq.redhat.com
URL:        https://xxx.redhat.com:9090
Features:   TFTP, DHCP, Puppet, Puppet CA
Created at: 2014/06/16 20:31:43
Updated at: 2014/06/16 20:31:43

Note, the features above, DNS does not exist.

but still we can associate DNSproxy to the subnet and domain.


 hammer subnet create --name libvirt --network 192.168.100.0 --mask 255.255.255.0 --dns-id 1 --dhcp-id 1 --tftp-id 1 --domain-ids 2
Subnet created


[root@xxxx provision]# hammer subnet info --name libvirt
Id:            1
Name:          libvirt
Network:       192.168.100.0
Mask:          255.255.255.0
Priority:      
DNS:           xxxx.redhat.com (https://xxxx.redhat.com:9090)
Primary DNS:   
Secondary DNS: 
TFTP:          xxxx.redhat.com (https://xxx.redhat.com:9090)
DHCP:          xxxx.redhat.com (https://xxx.redhat.com:9090)
VLAN ID:       
Gateway:       
From:          
To:            
Domains:       
    katellolabs.org

Comment 3 Kedar Bidarkar 2014-06-17 15:50:55 UTC
related to http://projects.theforeman.org/issues/6240

Comment 4 Kedar Bidarkar 2014-06-17 15:52:58 UTC
also related to  http://projects.theforeman.org/issues/6241

Comment 6 Bryan Kearney 2015-08-25 17:24:17 UTC
Upstream bug component is Capsule

Comment 7 Bryan Kearney 2016-02-19 11:05:29 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/6241 has been closed
-------------
Ondřej Pražák
Applied in changeset commit:4693fe5f86d75a3fbcc37596e7171594ebca6384.

Comment 10 Kedar Bidarkar 2016-04-04 22:08:06 UTC
[xyz@abc ~]# hammer subnet create --name libvirt --network x.x.x.x --mask 255.255.255.0 --dns-id 1 --dhcp-id 1 --domain-ids 1
[Foreman] Password for admin: 
Could not create the subnet:
  Dns does not have the DNS feature
[xyz@abc ~]# hammer domain create --name abc.redhat.com --dns-id 1
[Foreman] Password for admin: 
Could not create the domain:
  DNS domain has already been taken
  Dns does not have the DNS feature


VERIFIED with sat62-snap6.1

Comment 12 errata-xmlrpc 2016-07-27 09:09:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1501