-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
pending closureRequires immediate attention to avoid being closed for inactivityRequires immediate attention to avoid being closed for inactivitystatus: needs ownerThis issue is tentatively accepted pending a volunteer committed to its implementationThis issue is tentatively accepted pending a volunteer committed to its implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
NetBox version
v2.11.10
Python version
3.8
Steps to Reproduce
- Install a new instance of Netbox v2.11.9 (or earlier) with LDAP authentication. Use LDAP config params towards a working LDAP server as suggested by official Netbox documentation, except the following:
AUTH_LDAP_FIND_GROUP_PERMS = False
AUTH_LDAP_CACHE_GROUPS = True
AUTH_LDAP_CACHE_TIMEOUT = 60
AUTH_LDAP_GROUP_CACHE_TIMEOUT = 60
AUTH_LDAP_REQUIRE_GROUP = "CN=Netbox Users,OU=Groups,DC=mycompany,DC=com"
AUTH_LDAP_MIRROR_GROUPS = ["Netbox Admins", "Netbox Users"]
AUTH_LDAP_USER_FLAGS_BY_GROUP = {
"is_superuser": ["CN=Netbox Admins,OU=Groups,DC=mycompany,DC=com"]
}
Substitute domain and group names as appropriate, and make sure the LDAP account you use for testing is a member of 'Netbox Admins' as well as 'Netbox Users'.
- Log in and create an API token for yourself, with "write enabled" and no expiration date.
- POST an object via the REST-API (just to rule out potential hiccups with initial POST-request after upgrade)
curl -X POST \
-H "Authorization: Token <insert your token here>" \
-H "Content-Type: application/json" \
-H "Accept: application/json; indent=4" \
https://my-netbox-server/api/ipam/ip-addresses/ \
--data '{
"address": "10.0.0.1/24",
"description": "My IP Host 1"
}'
- POST another object via the REST-API, and take note of how long it takes to complete
curl -X POST \
-H "Authorization: Token <insert your token here>" \
-H "Content-Type: application/json" \
-H "Accept: application/json; indent=4" \
https://my-netbox-server/api/ipam/ip-addresses/ \
--data '{
"address": "10.0.0.2/24",
"description": "My IP Host 2"
}'
- Upgrade Netbox instance to v2.11.10 in accordance with official documentation
- POST an object via the REST-API (just to rule out potential hiccups with initial POST-request after upgrade)
curl -X POST \
-H "Authorization: Token <insert your token here>" \
-H "Content-Type: application/json" \
-H "Accept: application/json; indent=4" \
https://my-netbox-server/api/ipam/ip-addresses/ \
--data '{
"address": "10.0.0.3/24",
"description": "My IP Host 3"
}'
- POST another object via the REST-API, and take note of how long it takes to complete
curl -X POST \
-H "Authorization: Token <insert your token here>" \
-H "Content-Type: application/json" \
-H "Accept: application/json; indent=4" \
https://my-netbox-server/api/ipam/ip-addresses/ \
--data '{
"address": "10.0.0.4/24",
"description": "My IP Host 4"
}'
Expected Behavior
Netbox takes an (approximately) equal amount of time to return a response in step 7 when compared to step 4.
Observed Behavior
Netbox takes more than twice as long to return a response in step 7 when compared to step 4. In my specific case (low-spec'ed VM), this translates to step 4 taking around half a second, and step 7 taking over two seconds. I have also reproduced it on a higher-spec'ed bare-metal machine which is naturally faster, but the equation is still the same - i.e. step 7 taking over twice as long as step 4.
Metadata
Metadata
Assignees
Labels
pending closureRequires immediate attention to avoid being closed for inactivityRequires immediate attention to avoid being closed for inactivitystatus: needs ownerThis issue is tentatively accepted pending a volunteer committed to its implementationThis issue is tentatively accepted pending a volunteer committed to its implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application