Project

General

Profile

Actions

Bug #5338

closed

It's not possible to change status of a pending node with API

Added by Nicolas PERRON over 10 years ago. Updated over 9 years ago.

Status:
Rejected
Priority:
N/A
Category:
API
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

It's not possible to reject a pending node with API:

root@server:~# curl -k -H "X-API-Token: PojCJDhajkGqVx1TTmiZKNFZORKOYc8X" -X GET https://localhost/rudder/api/4/nodes/7b13f54f-7ab6-4a45-ada7-9049039b87ca?prettify=true 
{
  "action": "nodeDetails",
  "id": "7b13f54f-7ab6-4a45-ada7-9049039b87ca",
  "result": "success",
  "data": {
    "nodes": [
      {
        "architectureDescription": "x86_64-linux-thread-multi",
        "hostname": "node5",
        "managementTechnology": [
          {
            "name": "CFEngine Community" 
          }
        ],
        "status": "pending",
        "machine": {
          "id": "5A933D95-8C69-479B-AD8B-62373998E47B",
          "type": "Virtual",
          "provider": "vbox" 
        },
        "id": "7b13f54f-7ab6-4a45-ada7-9049039b87ca",
        "ipAddresses": [
          "127.0.0.1",
          "10.0.2.15",
          "192.168.42.15" 
        ],
        "ram": 244,
        "os": {
          "type": "Linux",
          "name": "Debian",
          "version": "6.0.4",
          "fullName": "Debian GNU/Linux 6.0.4 (squeeze)",
          "kernelVersion": "2.6.32-5-amd64" 
        },
        "lastInventoryDate": "2014-07-31 15:57",
        "policyServerId": "root" 
      }
    ]
  }
}

root@server:~# curl -k -H "X-API-Token: PojCJDhajkGqVx1TTmiZKNFZORKOYc8X" -X DELETE https://localhost/rudder/api/latest/nodes/7b13f54f-7ab6-4a45-ada7-9049039b87ca?prettify=true {
  "action": "changePendingNodeStatus",
  "result": "error",
  "errorDetails": "Node with ID '7b13f54f-7ab6-4a45-ada7-9049039b87ca' was not found" 
}
Actions #1

Updated by Nicolas PERRON over 10 years ago

  • Subject changed from It's not possible to reject a pending node with API to It's not possible to change status of a pending node with API

It is not possible to accept it too:

root@server:~# curl -k -H "X-API-Token: PojCJDhajkGqVx1TTmiZKNFZORKOYc8X" -X  POST https://localhost/rudder/api/latest/nodes/7b13f54f-7ab6-4a45-ada7-9049039b87ca?prettify=true -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/latest/nodes/7b13f54f-7ab6-4a45-ada7-9049039b87ca was not found on this server</body> </html>
root@server:~# curl -k -H "X-API-Token: PojCJDhajkGqVx1TTmiZKNFZORKOYc8X" -X  POST https://localhost/rudder/api/latest/nodes/pending/7b13f54f-7ab6-4a45-ada7-9049039b87ca?prettify=true -d "status=accepted" 
{
  "action": "changePendingNodeStatus",
  "result": "error",
  "errorDetails": "Error when trying to execute pre-accepting for phase accept_new_server:check_hostname_unicity. Stop." 
}
Actions #2

Updated by Nicolas PERRON over 10 years ago

  • Target version changed from 2.11.2 to 2.11.3
Actions #3

Updated by Matthieu CERDA about 10 years ago

  • Target version changed from 2.11.3 to 2.11.4
Actions #4

Updated by Vincent MEMBRÉ about 10 years ago

  • Target version changed from 2.11.4 to 2.11.5
Actions #5

Updated by Vincent MEMBRÉ about 10 years ago

  • Target version changed from 2.11.5 to 2.11.6
Actions #6

Updated by Vincent MEMBRÉ almost 10 years ago

  • Target version changed from 2.11.6 to 2.11.7
Actions #7

Updated by Vincent MEMBRÉ almost 10 years ago

  • Target version changed from 2.11.7 to 2.11.8
Actions #8

Updated by Vincent MEMBRÉ almost 10 years ago

  • Target version changed from 2.11.8 to 2.11.9
Actions #9

Updated by Vincent MEMBRÉ almost 10 years ago

  • Target version changed from 2.11.9 to 2.11.10
Actions #10

Updated by Vincent MEMBRÉ over 9 years ago

  • Target version changed from 2.11.10 to 2.11.11
Actions #11

Updated by Benoît PECCATTE over 9 years ago

  • Category set to API
  • Status changed from New to Rejected

This is possible now. Rejecting.

Actions

Also available in: Atom PDF