Project

General

Profile

Actions

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.

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

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 1 (0 open1 closed)

Related to Rudder - Bug #4386: List node API : typo on "machyneType" (should be "machineType")ReleasedFrançois ARMAND2014-01-17Actions
Actions #1

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

Actions #2

Updated by François ARMAND about 6 years ago

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

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.

Actions #4

Updated by François ARMAND about 6 years ago

  • Status changed from New to In progress
Actions #5

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?

Actions #6

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
Actions #7

Updated by Rudder Quality Assistant about 6 years ago

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

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

Actions #9

Updated by François ARMAND about 6 years ago

  • Status changed from Pending technical review to Pending release
Actions #10

Updated by Vincent MEMBRÉ almost 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
Actions #11

Updated by Vincent MEMBRÉ almost 6 years 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
Actions

Also available in: Atom PDF