Project

General

Profile

Actions

Bug #3874

closed

API: Changing pending node status doesn't work

Added by Olivier Mauras over 10 years ago. Updated over 10 years ago.

Status:
Released
Priority:
1
Category:
API
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

# curl -X GET -H "X-API-Version: 2" -H "X-API-Token: wRY5qwr8k6XTY7aaRdxFl3csDanZfuZG"  http://buildbox.internal/rudder/api/nodes/pending/8c979d92-8c21-4ce0-a383-27ce7cc0997b
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html> <body>The Requested URL /rudder/api/nodes/pending/8c979d92-8c21-4ce0-a383-27ce7cc0997b was not found on this server</body> </html>  

# curl -GET -H "X-API-Version: 2" -H "X-API-Token: wRY5qwr8k6XTY7aaRdxFl3csDanZfuZG"  http://buildbox.internal/rudder/api/nodes/pending
{"action":"listPendingNodes","result":"success","data":{"nodes":[{"id":"8c979d92-8c21-4ce0-a383-27ce7cc0997b","status":"pending","hostname":"ovz2.internal","osName":"Scientific"}]}}

# curl -X GET -H "X-API-Version: 2" -H "X-API-Token: wRY5qwr8k6XTY7aaRdxFl3csDanZfuZG"  http://buildbox.internal/rudder/api/nodes/pending -d "id=8c979d92-8c21-4ce0-a383-27ce7cc0997b" 
{"action":"listPendingNodes","result":"success","data":{"nodes":[{"id":"8c979d92-8c21-4ce0-a383-27ce7cc0997b","status":"pending","hostname":"ovz2.internal","osName":"Scientific"}]}}

# curl -X POST -H "X-API-Version: 2" -H "X-API-Token: wRY5qwr8k6XTY7aaRdxFl3csDanZfuZG"  http://buildbox.internal/rudder/api/nodes/pending -d "id=8c979d92-8c21-4ce0-a383-27ce7cc0997b" -d "status=accepted" 
{"action":"changePendingNodeStatus","result":"error","errorDetails":"You must add a node id as target"}

# curl -X POST -H "X-API-Version: 2" -H "X-API-Token: wRY5qwr8k6XTY7aaRdxFl3csDanZfuZG"  http://buildbox.internal/rudder/api/nodes/pending/8c979d92-8c21-4ce0-a383-27ce7cc0997b -d "status=accepted" 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html> <body>The Requested URL /rudder/api/nodes/pending/8c979d92-8c21-4ce0-a383-27ce7cc0997b was not found on this server</body> </html>  

# curl -X POST -H "X-API-Version: 2" -H "X-API-Token: wRY5qwr8k6XTY7aaRdxFl3csDanZfuZG"  http://buildbox.internal/rudder/api/nodes/8c979d92-8c21-4ce0-a383-27ce7cc0997b -d "status=accepted" 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html> <body>The Requested URL /rudder/api/nodes/8c979d92-8c21-4ce0-a383-27ce7cc0997b was not found on this server</body> </html>  

# curl -X POST -H "X-API-Version: 2" -H "X-API-Token: wRY5qwr8k6XTY7aaRdxFl3csDanZfuZG"  http://buildbox.internal/rudder/api/nodes -d "id=8c979d92-8c21-4ce0-a383-27ce7cc0997b" -d "status=accepted" 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html> <body>The Requested URL /rudder/api/nodes was not found on this server</body> </html>  

This makes impossible to accept nodes trough the API or i missed something in the API documentation.


Related issues 2 (0 open2 closed)

Related to Rudder - Bug #3880: Errors when accepting/refusing nodes are ignoredReleasedNicolas CHARLES2013-08-28Actions
Related to Rudder - Bug #3883: The limit of the eventlog length (64chars) could lead to SQL errorsReleasedNicolas CHARLES2013-08-29Actions
Actions

Also available in: Atom PDF