Project

General

Profile

Bug #13795

Remove old "machyne type" api Rest typo since it should not be called anymore

Added by Florian Heigl 29 days ago. Updated 13 days ago.

Status:
Released
Priority:
N/A
Category:
API
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
User visibility:
Infrequent - complex configurations | third party integrations
Effort required:
Very Small
Priority:
50
Tags:

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 :-))


Related issues

Related to Rudder - Bug #4386: List node API : typo on "machyneType" (should be "machineType")Released2014-01-17

Associated revisions

Revision 0c4ca74a (diff)
Added by François ARMAND 27 days ago

Fixes #13795: mach_y_neType in node info resp api answer (#4386 somehow ... reborn)

History

#1 Updated by François ARMAND 28 days ago

  • Tags 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).

#2 Updated by François ARMAND 28 days ago

  • Related to Bug #4386: List node API : typo on "machyneType" (should be "machineType") added

#3 Updated by François ARMAND 27 days 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.

#4 Updated by François ARMAND 27 days ago

  • Status changed from New to In progress

#5 Updated by François ARMAND 27 days 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?

#6 Updated by François ARMAND 27 days 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

#7 Updated by Normation Quality Assistant 27 days ago

  • Assignee changed from Vincent MEMBRÉ to François ARMAND

#8 Updated by Florian Heigl 26 days 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 ;-)

#9 Updated by François ARMAND 26 days ago

  • Status changed from Pending technical review to Pending release

#10 Updated by Vincent MEMBRÉ 13 days 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

#11 Updated by Vincent MEMBRÉ 13 days ago

  • Status changed from Pending release to Released
This bug has been fixed in Rudder 4.1.17, 4.3.7 and 5.0.3 which were released today.
Changelog
Changelog
Changelog

Also available in: Atom PDF