Bug #13795
closed
Remove old "machyne type" api Rest typo since it should not be called anymore
Added by Florian Heigl about 6 years ago.
Updated almost 6 years ago.
Severity:
Minor - inconvenience | misleading | easy workaround
User visibility:
Infrequent - complex configurations | third party integrations
Effort required:
Very Small
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 :-))
- 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).
- Related to Bug #4386: List node API : typo on "machyneType" (should be "machineType") added
- 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.
- Status changed from New to In progress
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?
- 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
- Assignee changed from Vincent MEMBRÉ to François ARMAND
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 ;-)
- Status changed from Pending technical review to Pending release
- 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
- Status changed from Pending release to Released
Also available in: Atom
PDF