Project

General

Profile

Actions

Bug #13094

closed

Not able to list DHCP records for a particular subnet through DHCP SmartProxy API

Added by Konstantin Orekhov almost 9 years ago. Updated almost 9 years ago.

Status:
Duplicate
Priority:
High
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Listing of all subnets works just fine:

  1. curl -kSs --cacert /var/lib/puppet/ssl/certs/ca.pem --cert /var/lib/puppet/ssl/certs/`hostname -f`.pem --key /var/lib/puppet/ssl/private_keys/`hostname -f`.pem -H "Content-Type: application/json" -H "Accept:application/json" https://localhost:8443/dhcp | jq '.' | head
    [ {
    "network": "10.122.224.0",
    "netmask": "255.255.255.252"
    }, {
    "network": "10.122.225.0",
    "netmask": "255.255.255.252"
    }, {

However, an attempt to list records under any of subnets or getting details of particular DHCP record results in this error:

  1. curl -k --cacert /var/lib/puppet/ssl/certs/ca.pem --cert /var/lib/puppet/ssl/certs/`hostname -f`.pem --key /var/lib/puppet/ssl/private_keys/`hostname -f`.pem -H "Content-Type: application/json" -H "Accept:application/json" https://localhost:8443/dhcp/10.122.194.0
    address family must be specified
  1. curl -k --cacert /var/lib/puppet/ssl/certs/ca.pem --cert /var/lib/puppet/ssl/certs/`hostname -f`.pem --key /var/lib/puppet/ssl/private_keys/`hostname -f`.pem -H "Content-Type: application/json" -H "Accept:application/json" https://localhost:8443/dhcp/10.122.194.0/10.122.194.250
    address family must be specified

Related issues 1 (0 open1 closed)

Is duplicate of Smart Proxy - Bug #13062: smart-proxy throws an error when the field for fixed-address does not match a valid IP.ClosedDominic Cleal01/08/2016Actions
Actions #1

Updated by Konstantin Orekhov almost 9 years ago

  • Project changed from Foreman to Smart Proxy
Actions #2

Updated by Konstantin Orekhov almost 9 years ago

Just verified that in 1.9.2 things were working correctly.

Something changed between DHCP browser versions?

1.9.2 (rhel6.4) machine:
  1. rpm -qa | grep foreman_dhcp
    ruby193-rubygem-foreman_dhcp_browser-0.0.6-1.el6.noarch
1.10.0 (centos7.1) machine:
  1. rpm -qa | grep foreman_dhcp
    tfm-rubygem-foreman_dhcp_browser-0.0.7-2.el7.noarch
Actions #3

Updated by Konstantin Orekhov almost 9 years ago

This is the result from API call to 1.9.2 machine:

  1. curl -kSs --cacert /var/lib/puppet/ssl/certs/ca.pem --cert /var/lib/puppet/ssl/certs/`hostname -f`.pem --key /var/lib/puppet/ssl/private_keys/`hostname -f`.pem -H "Content-Type: application/json" -H "Accept:application/json" https://localhost:8443/dhcp/10.30.192.0 | jq '.' {
    "reservations": [ {
    "hostname": "test8b03c-c59a",
    "mac": "52:54:69:ff:53:bf",
    "ip": "10.30.192.201"
    }, {
    "hostname": "test8b03c-f22c",
    "mac": "52:54:e1:03:40:dc",
    "ip": "10.30.192.202"
    }, {
    "hostname": "test8b03c-e09f",
    "mac": "52:54:fa:0b:fb:13",
    "ip": "10.30.192.203"
    }, {
    "hostname": "test8b03c-f22f",
    "mac": "52:54:e1:03:30:92",
    "ip": "10.30.192.204"
    }, {
    "hostname": "test8b03c-f17a",
    "mac": "52:54:fa:06:f4:97",
    "ip": "10.30.192.205"
    }
    ],
    "leases": []
    }
Actions #4

Updated by Konstantin Orekhov almost 9 years ago

  • Priority changed from Normal to High
Actions #5

Updated by Dominic Cleal almost 9 years ago

  • Is duplicate of Bug #13062: smart-proxy throws an error when the field for fixed-address does not match a valid IP. added
Actions #6

Updated by Dominic Cleal almost 9 years ago

  • Status changed from New to Duplicate

Thanks for the report. This is currently filed as #13062, and as you spotted, it's a regression versus 1.9 when there's a DHCP host {} entry missing a fixed-address/IP address.

Actions

Also available in: Atom PDF