Create Subnet API parameters no longer working after upgrading to satellite 6.6

Posted on

Before upgrading satellite to v6.6.1, we were on v6.2.3 when the following parameters were working when passed as json body to the REST-API :

          organization_ids: ['1']
          location_ids: ['2']
          domain_ids: ['1']
  • We were passing this as an ansible task like :
   - name: Create Subnet Id for pod {{ podname }}
      uri:  
        url: https://{{ satellite_fqdn_name }}/api/subnets
        status_code: 200,401
        retries: 30
        delay: 5
        method: POST
        user: "{{ satellite_user }}"
        password: "{{ satellite_passwd }}"
        force_basic_auth: yes
        validate_certs: no
        headers:
          Content-Type: "application/json"
          Accept: "version=2,application/json"
        body:
          boot_mode: Static
          cidr: "{{ ext_net_cidr.split('/')[1] }}"
          dns_primary: "{{ dns_ip }}"
          gateway: "{{ ext_inface_default_route }}"
          mask: 255.255.255.0
          name: "{{ stack_name }}-subnet"
          network: "{{ ext_net_cidr.split('/')[0] }}"
          network_address: "{{ ext_net_cidr }}"
          organization_ids: ['1']
          location_ids: ['2']
          domain_ids: ['1']
        body_format: json
      register: subnetid_out
      until: ('status' in subnetid_out) and (subnetid_out.status == 200 or subnetid_out.status == 401)
      changed_when: ('status' in subnetid_out) and (subnetid_out.status == 422)
      ignore_errors: yes
  • Now post the 6.6 upgrade the subnet gets created, however the location, organization and domains dont get associated to the subnet.

  • Also tried to manually update the subnet using curl like below :

# curl --request PUT -k -u admin:password --header "Accept:application/json,version=2" --header "Content-Type:application/json" --data {\"domain_ids\":\"['1']\"} https://satellite.example.com/api/v2/subnets/39 | python -m json.tool

# curl --request PUT -k -u admin:password --header "Accept:application/json,version=2" --header "Content-Type:application/json" --data {\"organization_ids\":\"['1']\"} https://satellite.example.com/api/v2/subnets/39 | python -m json.tool 

# curl --request PUT -k -u admin:password --header "Accept:application/json,version=2" --header "Content-Type:application/json" --data {\"location_ids\":\"['2']\"} https://satellite.example.com/api/v2/subnets/39 | python -m json.tool
  • There are no ERRORS returned by the above commands.
  • If we check for confirmation :
# curl --request GET -k -u admin:password --header "Accept:application/json,version=2" --header "Content-Type:application/json" https://satellite.example.com/api/v2/subnets/39 | python -m json.tool|awk '/domain|location|organiz/'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   782    0   782    0     0   4535      0 --:--:-- --:--:-- --:--:--  4546
    "domains": [],
    "locations": [],
    "organizations": [],

The id's are blank. Due to this our automation to create a host is failing.

Responses