First off, the juju community rocks! Thanks for the assistance on this.
Secondly: Holy I think I’m in way over my head here.
So from a mongo perspective, does the capitalisation matter?
In MAAS I have 3 spaces Named
PLatformInfrastructureSpace
PlatformVMInstancesSpace
(undefined)
According to the Mongo query, these are all returned as lower case. Is this maybe why it’s saying that the space is not found?
Snip of MAAS query:
{
"id": 2,
"resource_uri": "/MAAS/api/2.0/spaces/2/",
"subnets": [
{
"name": "XXX.XXX.XXX.192/26",
"vlan": {
"vid": 1052,
"mtu": 1500,
"dhcp_on": false,
"external_dhcp": null,
"relay_vlan": null,
"id": 5002,
"fabric_id": 0,
"space": "PlatformVMInstancesSpace",
"primary_rack": null,
"fabric": "US-EAST-Copper_Fabric",
"name": "USE-VA-LAB-PUB",
"secondary_rack": null,
"resource_uri": "/MAAS/api/2.0/vlans/5002/"
},
"cidr": "XXX.XXX.XXX.192/26",
"rdns_mode": 2,
"gateway_ip": "XXX.XXX.XXX.193",
"dns_servers": [],
"allow_dns": true,
"allow_proxy": true,
"active_discovery": true,
"managed": true,
"id": 2,
"space": "PlatformVMInstancesSpace",
"resource_uri": "/MAAS/api/2.0/subnets/2/"
},
{
"name": "XXX.XXX.XXX.128/28",
"vlan": {
"vid": 1053,
"mtu": 1500,
"dhcp_on": true,
"external_dhcp": null,
"relay_vlan": null,
"id": 5012,
"fabric_id": 0,
"space": "PlatformVMInstancesSpace",
"primary_rack": "gaw3xb",
"fabric": "US-EAST-Copper_Fabric",
"name": "USE-VA-LAB-VIRSH",
"secondary_rack": null,
"resource_uri": "/MAAS/api/2.0/vlans/5012/"
},
"cidr": "XXX.XXX.XXX.128/28",
"rdns_mode": 2,
"gateway_ip": "XXX.XXX.XXX.129",
"dns_servers": [],
"allow_dns": true,
"allow_proxy": true,
"active_discovery": false,
"managed": true,
"id": 12,
"space": "PlatformVMInstancesSpace",
"resource_uri": "/MAAS/api/2.0/subnets/12/"
},
{
"name": "XXX.XXX.XXX.112/29",
"vlan": {
"vid": 894,
"mtu": 1500,
"dhcp_on": true,
"external_dhcp": null,
"relay_vlan": null,
"id": 5020,
"fabric_id": 0,
"space": "PlatformVMInstancesSpace",
"primary_rack": "gaw3xb",
"fabric": "US-EAST-Copper_Fabric",
"name": "894-C3-R-PXYDMZ",
"secondary_rack": null,
"resource_uri": "/MAAS/api/2.0/vlans/5020/"
},
"cidr": "XXX.XXX.XXX.112/29",
"rdns_mode": 2,
"gateway_ip": "XXX.XXX.XXX.113",
"dns_servers": [],
"allow_dns": true,
"allow_proxy": true,
"active_discovery": false,
"managed": true,
"id": 18,
"space": "PlatformVMInstancesSpace",
"resource_uri": "/MAAS/api/2.0/subnets/18/"
}
],
"vlans": [
{
"vid": 1052,
"mtu": 1500,
"dhcp_on": false,
"external_dhcp": null,
"relay_vlan": null,
"id": 5002,
"fabric_id": 0,
"space": "PlatformVMInstancesSpace",
"primary_rack": null,
"fabric": "US-EAST-Copper_Fabric",
"name": "USE-VA-LAB-PUB",
"secondary_rack": null,
"resource_uri": "/MAAS/api/2.0/vlans/5002/"
},
{
"vid": 894,
"mtu": 1500,
"dhcp_on": true,
"external_dhcp": null,
"relay_vlan": null,
"id": 5020,
"fabric_id": 0,
"space": "PlatformVMInstancesSpace",
"primary_rack": "gaw3xb",
"fabric": "US-EAST-Copper_Fabric",
"name": "894-C3-R-PXYDMZ",
"secondary_rack": null,
"resource_uri": "/MAAS/api/2.0/vlans/5020/"
},
{
"vid": 1053,
"mtu": 1500,
"dhcp_on": true,
"external_dhcp": null,
"relay_vlan": null,
"id": 5012,
"fabric_id": 0,
"space": "PlatformVMInstancesSpace",
"primary_rack": "gaw3xb",
"fabric": "US-EAST-Copper_Fabric",
"name": "USE-VA-LAB-VIRSH",
"secondary_rack": null,
"resource_uri": "/MAAS/api/2.0/vlans/5012/"
}
],
"name": "PlatformVMInstancesSpace"
Mongo Query
juju:PRIMARY> db.spaces.find().pretty()
{
"_id" : "9497265d-6bb5-49c0-83ca-ca4248c86a8e:1",
"spaceid" : "1",
"life" : 0,
"name" : "platforminfrastructurespace",
"is-public" : false,
"providerid" : "1",
"model-uuid" : "9497265d-6bb5-49c0-83ca-ca4248c86a8e",
"txn-revno" : NumberLong(2),
"txn-queue" : [
"5e2b2bc53c71e65a73bd317b_42edfa36"
]
}
{
"_id" : "9497265d-6bb5-49c0-83ca-ca4248c86a8e:2",
"spaceid" : "2",
"life" : 0,
"name" : "platformvminstancesspace",
"is-public" : false,
"providerid" : "2",
"model-uuid" : "9497265d-6bb5-49c0-83ca-ca4248c86a8e",
"txn-revno" : NumberLong(2),
"txn-queue" : [
"5e2b2bc53c71e65a73bd317b_42edfa36"
]
}
{
"_id" : "9497265d-6bb5-49c0-83ca-ca4248c86a8e:3",
"spaceid" : "3",
"life" : 0,
"name" : "undefined",
"is-public" : false,
"providerid" : "-1",
"model-uuid" : "9497265d-6bb5-49c0-83ca-ca4248c86a8e",
"txn-revno" : NumberLong(2),
"txn-queue" : [
"5e2b2bc53c71e65a73bd317b_42edfa36"
]
}
{
"_id" : "9497265d-6bb5-49c0-83ca-ca4248c86a8e:0",
"spaceid" : "0",
"life" : 0,
"name" : "alpha",
"is-public" : true,
"model-uuid" : "9497265d-6bb5-49c0-83ca-ca4248c86a8e",
"txn-revno" : NumberLong(2),
"txn-queue" : [
"5e2b2bc53c71e65a73bd317b_42edfa36",
"5e2b2c3d3c71e65a73bd3193_b2d3a172",
"5e2b2cb53c71e65a73bd319a_f48dcfe6",
"5e2b2d2d3c71e65a73bd31a1_32da53ad",
"5e2b2da53c71e65a73bd31a8_ca482d35",
"5e2c64c93c71e60448cd7494_1fb809b7",
"5e2c65423c71e60448cd749c_c9c833e0",
"5e2c65ba3c71e60448cd74a3_eaa87f2c",
"5e2c66323c71e60448cd74aa_bd188f5a",
"5e2c66aa3c71e60448cd74b1_8495da0a",
"5e30b0913c71e6154f11c7a7_29b68fb4",
"5e30b1093c71e6154f11c7af_5c71f4e5",
"5e30b1813c71e6154f11c7b6_15a1fb3c",
"5e30b1f93c71e6154f11c7bd_b224f936",
"5e30b2713c71e6154f11c7c4_9822a326",
"5e30b29c3c71e616b98ee4b6_27adb29b",
"5e30b3143c71e616b98ee4be_aa5fde1b",
"5e30b38c3c71e616b98ee4c5_8d5a7442",
"5e30b4043c71e616b98ee4cc_a18c9d00",
"5e30b47c3c71e616b98ee4d3_01f86320",
"5e30cfa73c71e6180d85bff6_5d43ab58"
]
}
{
"_id" : "c64de938-32d1-4528-8604-88c9ef8f5e9e:1",
"spaceid" : "1",
"life" : 0,
"name" : "platforminfrastructurespace",
"is-public" : false,
"providerid" : "1",
"model-uuid" : "c64de938-32d1-4528-8604-88c9ef8f5e9e",
"txn-revno" : NumberLong(2),
"txn-queue" : [
"5e2b2bc53c71e65a73bd317c_206414be"
]
}
{
"_id" : "c64de938-32d1-4528-8604-88c9ef8f5e9e:2",
"spaceid" : "2",
"life" : 0,
"name" : "platformvminstancesspace",
"is-public" : false,
"providerid" : "2",
"model-uuid" : "c64de938-32d1-4528-8604-88c9ef8f5e9e",
"txn-revno" : NumberLong(2),
"txn-queue" : [
"5e2b2bc53c71e65a73bd317c_206414be"
]
}
{
"_id" : "c64de938-32d1-4528-8604-88c9ef8f5e9e:3",
"spaceid" : "3",
"life" : 0,
"name" : "undefined",
"is-public" : false,
"providerid" : "-1",
"model-uuid" : "c64de938-32d1-4528-8604-88c9ef8f5e9e",
"txn-revno" : NumberLong(2),
"txn-queue" : [
"5e2b2bc53c71e65a73bd317c_206414be"
]
}
{
"_id" : "c64de938-32d1-4528-8604-88c9ef8f5e9e:0",
"spaceid" : "0",
"life" : 0,
"name" : "alpha",
"is-public" : true,
"model-uuid" : "c64de938-32d1-4528-8604-88c9ef8f5e9e",
"txn-revno" : NumberLong(2),
"txn-queue" : [
"5e2b2bc53c71e65a73bd317c_206414be",
"5e2b2c3d3c71e65a73bd3194_e4ccbfb9",
"5e2b2cb53c71e65a73bd319b_8262416e",
"5e2b2d2d3c71e65a73bd31a2_2acc5702",
"5e2b2da53c71e65a73bd31a9_9bd37bf0",
"5e2c64c93c71e60448cd7495_f9f624c2",
"5e2c65423c71e60448cd749d_4a56b4ab",
"5e2c65ba3c71e60448cd74a4_4954642b",
"5e2c66323c71e60448cd74ab_b0e5182e",
"5e2c66aa3c71e60448cd74b2_8c629858",
"5e30b0913c71e6154f11c7a8_761e425c",
"5e30b1093c71e6154f11c7b0_ba4a1a09",
"5e30b1813c71e6154f11c7b7_c42999ba",
"5e30b1f93c71e6154f11c7be_9da91ad6",
"5e30b2713c71e6154f11c7c5_dfbe3414",
"5e30b29c3c71e616b98ee4b7_3e123723",
"5e30b3143c71e616b98ee4bf_86191c11",
"5e30b38c3c71e616b98ee4c6_1b8088db",
"5e30b4043c71e616b98ee4cd_312e67bb",
"5e30b47c3c71e616b98ee4d4_b0d5699e",
"5e30cfa73c71e6180d85bff7_5dd6ef1b"
]
}
{
"_id" : "2e642325-0eca-4b63-8238-53591a1089b9:1",
"spaceid" : "1",
"life" : 0,
"name" : "platforminfrastructurespace",
"is-public" : false,
"providerid" : "1",
"model-uuid" : "2e642325-0eca-4b63-8238-53591a1089b9",
"txn-revno" : NumberLong(2),
"txn-queue" : [
"5e2b2bc53c71e65a73bd317d_5395aed2"
]
}
{
"_id" : "2e642325-0eca-4b63-8238-53591a1089b9:2",
"spaceid" : "2",
"life" : 0,
"name" : "platformvminstancesspace",
"is-public" : false,
"providerid" : "2",
"model-uuid" : "2e642325-0eca-4b63-8238-53591a1089b9",
"txn-revno" : NumberLong(2),
"txn-queue" : [
"5e2b2bc53c71e65a73bd317d_5395aed2"
]
}
{
"_id" : "2e642325-0eca-4b63-8238-53591a1089b9:3",
"spaceid" : "3",
"life" : 0,
"name" : "undefined",
"is-public" : false,
"providerid" : "-1",
"model-uuid" : "2e642325-0eca-4b63-8238-53591a1089b9",
"txn-revno" : NumberLong(2),
"txn-queue" : [
"5e2b2bc53c71e65a73bd317d_5395aed2"
]
}
{
"_id" : "2e642325-0eca-4b63-8238-53591a1089b9:0",
"spaceid" : "0",
"life" : 0,
"name" : "alpha",
"is-public" : true,
"model-uuid" : "2e642325-0eca-4b63-8238-53591a1089b9",
"txn-revno" : NumberLong(2),
"txn-queue" : [
"5e2b2bc53c71e65a73bd317d_5395aed2",
"5e2b2c3d3c71e65a73bd3195_50a83d90",
"5e2b2cb53c71e65a73bd319c_7f22e7f4",
"5e2b2d2d3c71e65a73bd31a3_bab53b29",
"5e2b2da53c71e65a73bd31aa_7c33dd07",
"5e2c64c93c71e60448cd7496_5ad56a6f",
"5e2c65423c71e60448cd749e_707905a4",
"5e2c65ba3c71e60448cd74a5_b88358bf",
"5e2c66323c71e60448cd74ac_2e79d99c",
"5e2c66aa3c71e60448cd74b3_a7c96c86",
"5e30b0913c71e6154f11c7a9_4681a9ea",
"5e30b1093c71e6154f11c7b1_162cc0a3",
"5e30b1813c71e6154f11c7b8_3ee163b4",
"5e30b1f93c71e6154f11c7bf_77c61c0a",
"5e30b2713c71e6154f11c7c6_ca65773a",
"5e30b29c3c71e616b98ee4b8_ce8648d3",
"5e30b3143c71e616b98ee4c0_bde26790",
"5e30b38c3c71e616b98ee4c7_8f05e375",
"5e30b4043c71e616b98ee4ce_2b30c1fc",
"5e30b47c3c71e616b98ee4d5_6c8d0a2b",
"5e30cfa73c71e6180d85bff8_6bfffa87"
]
}
{
"_id" : "8cb3c466-ddfd-4795-8c60-b8103504b9d6:1",
"spaceid" : "1",
"life" : 0,
"name" : "platforminfrastructurespace",
"is-public" : false,
"providerid" : "1",
"model-uuid" : "8cb3c466-ddfd-4795-8c60-b8103504b9d6",
"txn-revno" : NumberLong(2),
"txn-queue" : [
"5e2b2bc53c71e65a73bd317e_db7e082b"
]
}
{
"_id" : "8cb3c466-ddfd-4795-8c60-b8103504b9d6:2",
"spaceid" : "2",
"life" : 0,
"name" : "platformvminstancesspace",
"is-public" : false,
"providerid" : "2",
"model-uuid" : "8cb3c466-ddfd-4795-8c60-b8103504b9d6",
"txn-revno" : NumberLong(2),
"txn-queue" : [
"5e2b2bc53c71e65a73bd317e_db7e082b"
]
}
{
"_id" : "8cb3c466-ddfd-4795-8c60-b8103504b9d6:3",
"spaceid" : "3",
"life" : 0,
"name" : "undefined",
"is-public" : false,
"providerid" : "-1",
"model-uuid" : "8cb3c466-ddfd-4795-8c60-b8103504b9d6",
"txn-revno" : NumberLong(2),
"txn-queue" : [
"5e2b2bc53c71e65a73bd317e_db7e082b"
]
}
{
"_id" : "8cb3c466-ddfd-4795-8c60-b8103504b9d6:0",
"spaceid" : "0",
"life" : 0,
"name" : "alpha",
"is-public" : true,
"model-uuid" : "8cb3c466-ddfd-4795-8c60-b8103504b9d6",
"txn-revno" : NumberLong(2),
"txn-queue" : [
"5e2b2bc53c71e65a73bd317e_db7e082b",
"5e2b2c3d3c71e65a73bd3196_ebd13e5f",
"5e2b2cb53c71e65a73bd319d_f121b9f9",
"5e2b2d2d3c71e65a73bd31a4_e1507b72",
"5e2b2da53c71e65a73bd31ab_95711515",
"5e2c64c93c71e60448cd7497_c00768fa",
"5e2c65423c71e60448cd749f_a6963cf4",
"5e2c65ba3c71e60448cd74a6_948ba475",
"5e2c66323c71e60448cd74ad_8fd40c3f",
"5e2c66aa3c71e60448cd74b4_cbbe6c54",
"5e30b0913c71e6154f11c7aa_e0c092d9",
"5e30b1093c71e6154f11c7b2_58b60ecf",
"5e30b1813c71e6154f11c7b9_c8055cb2",
"5e30b1f93c71e6154f11c7c0_b426ef2b",
"5e30b2713c71e6154f11c7c7_4e9c1d36",
"5e30b29c3c71e616b98ee4b9_e4f53879",
"5e30b3143c71e616b98ee4c1_183e41de",
"5e30b38c3c71e616b98ee4c8_7896a1fe",
"5e30b4043c71e616b98ee4cf_0266e2dd",
"5e30b47c3c71e616b98ee4d6_d7f6620a",
"5e30cfa73c71e6180d85bff9_ed8febf5"
]
}
{
"_id" : "90c9f5ac-8a7c-4d22-819c-6e86c0089c1a:1",
"spaceid" : "1",
"life" : 0,
"name" : "platforminfrastructurespace",
"is-public" : false,
"providerid" : "1",
"model-uuid" : "90c9f5ac-8a7c-4d22-819c-6e86c0089c1a",
"txn-revno" : NumberLong(2),
"txn-queue" : [
"5e2b2bc53c71e65a73bd317f_b3d5e4d8"
]
}
{
"_id" : "90c9f5ac-8a7c-4d22-819c-6e86c0089c1a:2",
"spaceid" : "2",
"life" : 0,
"name" : "platformvminstancesspace",
"is-public" : false,
"providerid" : "2",
"model-uuid" : "90c9f5ac-8a7c-4d22-819c-6e86c0089c1a",
"txn-revno" : NumberLong(2),
"txn-queue" : [
"5e2b2bc53c71e65a73bd317f_b3d5e4d8"
]
}
{
"_id" : "90c9f5ac-8a7c-4d22-819c-6e86c0089c1a:3",
"spaceid" : "3",
"life" : 0,
"name" : "undefined",
"is-public" : false,
"providerid" : "-1",
"model-uuid" : "90c9f5ac-8a7c-4d22-819c-6e86c0089c1a",
"txn-revno" : NumberLong(2),
"txn-queue" : [
"5e2b2bc53c71e65a73bd317f_b3d5e4d8"
]
}
{
"_id" : "90c9f5ac-8a7c-4d22-819c-6e86c0089c1a:0",
"spaceid" : "0",
"life" : 0,
"name" : "alpha",
"is-public" : true,
"model-uuid" : "90c9f5ac-8a7c-4d22-819c-6e86c0089c1a",
"txn-revno" : NumberLong(2),
"txn-queue" : [
"5e2b2bc53c71e65a73bd317f_b3d5e4d8",
"5e2b2c3d3c71e65a73bd3197_627fa86a",
"5e2b2cb53c71e65a73bd319e_208646cc",
"5e2b2d2d3c71e65a73bd31a5_668b739c",
"5e2b2da53c71e65a73bd31ac_bc0ef2af",
"5e2c64c93c71e60448cd7498_566c6f06",
"5e2c65423c71e60448cd74a0_057bfca8",
"5e2c65ba3c71e60448cd74a7_e8c4b2c6",
"5e2c66323c71e60448cd74ae_f89deb58",
"5e2c66aa3c71e60448cd74b5_4bfb23ec",
"5e30b0913c71e6154f11c7ab_af7a4de2",
"5e30b1093c71e6154f11c7b3_f13f651f",
"5e30b1813c71e6154f11c7ba_2a8e9517",
"5e30b1f93c71e6154f11c7c1_f7c7fb74",
"5e30b2713c71e6154f11c7c8_66a1822a",
"5e30b29c3c71e616b98ee4ba_a4503a58",
"5e30b3143c71e616b98ee4c2_75ab2ace",
"5e30b38c3c71e616b98ee4c9_2eaa5171",
"5e30b4043c71e616b98ee4d0_7679c31b",
"5e30b47c3c71e616b98ee4d7_7d673304",
"5e30cfa73c71e6180d85bffa_644c96f8"
]
}
Type "it" for more
juju:PRIMARY> ^C
bye