Bug #13795
closedRemove old "machyne type" api Rest typo since it should not be called anymore
Description
Hi,
I ran the following:
for node in $(rudder-cli node list_pending | jq '.nodes[].id' | sed 's/\"//g') ; do
rudder-cli node accept $node 2>/dev/null
done
And in the results I see machyneType
@{
"nodes": [
{
"hostname": "svc-debian8",
"id": "53c507b4-c450-4406-8177-5c8cb59b77ac",
"machyneType": "Virtual",
"osName": "Debian",
"osVersion": "[8.11]",
"status": "accepted"
}
]
}@
my rudder-cli on that system is probably 2 years old, I but since the bug predates that by a lot, I'm afraid you still got a machyneType somewhere in your code :-))
Updated by François ARMAND about 6 years ago
- Translation missing: en.field_tag_list set to community
- Subject changed from #4386 somehow ... reborn to mach_y_neType in node info resp api answer (#4386 somehow ... reborn)
- Target version set to 4.1.17
- Effort required set to Very Small
- Priority changed from 22 to 50
Hum. We had it for compatibility reason in api v2, but since v2 isn't supported anymore, we should never return it. I'm marking it as very small (at minimum, we should delete the corresponding code in 5.0 or even 4.1 I believe).
Updated by François ARMAND about 6 years ago
- Related to Bug #4386: List node API : typo on "machyneType" (should be "machineType") added
Updated by François ARMAND about 6 years ago
- Assignee set to François ARMAND
So, in 4.1 api v2 is still present as code but not accessible anymore. Moreover, "machyneType" is guarded by an "if" that use to be "if(apiv2)" but is now if(false)... So very strange.
I will clean the code (that's just dead code that can lead to strange behavior... Perhaps like here). But I would love to know if you get the same result with curl, or if it is somehow linked to python cli.
Updated by François ARMAND about 6 years ago
- Status changed from New to In progress
Updated by François ARMAND about 6 years ago
OK, the false is not what I was expecting, but in rudder 4.1 I found no way to call api v2 (neither by url nor header). So it seems link to rudder cli. Does a grep on "machyneType" on the python script version you use returns anything?
Updated by François ARMAND about 6 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Vincent MEMBRÉ
- Pull Request set to https://github.com/Normation/rudder/pull/2066
Updated by Rudder Quality Assistant about 6 years ago
- Assignee changed from Vincent MEMBRÉ to François ARMAND
Updated by Florian Heigl about 6 years ago
seems not. Idk. Maybe it was hitting the old API version.
I checked my .rudder file and it also does not specificy the API version.
[root@rudder rudder-api-client-master]# grep -Ri machyne *
[root@rudder rudder-api-client-master]#
Congrats on saying good bye to old code ;-)
Updated by François ARMAND about 6 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|0c4ca74a222d933f4736110ae710622b3daadaa2.
Updated by Vincent MEMBRÉ about 6 years ago
- Subject changed from mach_y_neType in node info resp api answer (#4386 somehow ... reborn) to Remove old "machyne type" api Rest typo since it should not be called anymore
Updated by Vincent MEMBRÉ about 6 years ago
- Status changed from Pending release to Released