Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sensuctl cannot update entity #1461

Closed
teekennedy opened this issue May 7, 2018 · 3 comments · Fixed by #1546
Closed

sensuctl cannot update entity #1461

teekennedy opened this issue May 7, 2018 · 3 comments · Fixed by #1546
Labels
bug component:sensuctl Sensu CLI improvements

Comments

@teekennedy
Copy link
Contributor

Expected Behavior

Able to update entities subscriptions through sensuctl entity update [entity-id]

Current Behavior

Command exits early after prompting for new subscription list:

$ bin/sensuctl entity update t-sensu
? Subscriptions: entity:t-sensu
Error: not found

Possible Solution

Looks like we're missing a route for updating entities.

Context

Discovered while running through release QA checklist.

Your Environment

  • Sensu version used (sensuctl, sensu-backend, and/or sensu-agent): commit e91bfb3
  • Installation method (packages, binaries, docker etc.): local build
  • Operating System and version (e.g. Ubuntu 14.04): macOS 10.13.4
@teekennedy teekennedy added bug component:sensuctl Sensu CLI improvements labels May 7, 2018
@grepory
Copy link
Contributor

grepory commented May 8, 2018

I think #1468 will fix this.

@treydock
Copy link
Contributor

Ran into this issue using sensuctl create -f to try and update an entity.

[root@sensu-backend ~]# sensuctl entity info sensu-backend.example.com
=== sensu-backend.example.com
ID:                     sensu-backend.example.com
Class:                  agent
Subscriptions:          entity:sensu-backend.example.com
Last Seen:              2018-05-09 00:45:38 +0000 UTC
Hostname:               sensu-backend.example.com
OS:                     linux
Platform:               centos
Platform Family:        rhel
Platform Version:       7.4.1708
Auto-Deregistration:    false
Deregistration Handler:

[root@sensu-backend ~]# cat /tmp/entity.json
{
  "type": "Entity",
  "spec": {
    "id": "sensu-backend.example.com",
    "class": "agent",
    "deregister": true,
    "keepalive_timeout": 120,
    "organization": "default",
    "environment": "default"
  }
}
[root@sensu-backend ~]# sensuctl create -f /tmp/entity.json
Error: PUT "/entities/sensu-backend.example.com": {"code":2,"error":"not found"}

CC @ghoneycutt

treydock added a commit to treydock/sensu-puppet that referenced this issue May 13, 2018
This commit is incomplete and needs further updates as sensu-go issues are resolved

sensu/sensu-go#1479
sensu/sensu-go#1461
sensu/sensu-go#1468
sensu/sensu-go#1099
treydock added a commit to treydock/sensu-puppet that referenced this issue May 13, 2018
This commit is incomplete and needs further updates as sensu-go issues are resolved

sensu/sensu-go#1479
sensu/sensu-go#1461
sensu/sensu-go#1468
sensu/sensu-go#1099
treydock added a commit to treydock/sensu-puppet that referenced this issue May 13, 2018
This commit is incomplete and needs further updates as sensu-go issues are resolved

sensu/sensu-go#1479
sensu/sensu-go#1461
sensu/sensu-go#1468
sensu/sensu-go#1099
treydock added a commit to treydock/sensu-puppet that referenced this issue May 15, 2018
This commit is incomplete and needs further updates as sensu-go issues are resolved

sensu/sensu-go#1479
sensu/sensu-go#1461
sensu/sensu-go#1468
sensu/sensu-go#1099
@mercul3s mercul3s self-assigned this May 16, 2018
treydock added a commit to treydock/sensu-puppet that referenced this issue May 20, 2018
This commit is incomplete and needs further updates as sensu-go issues are resolved

sensu/sensu-go#1479
sensu/sensu-go#1461
sensu/sensu-go#1468
sensu/sensu-go#1099
treydock added a commit to treydock/sensu-puppet that referenced this issue May 21, 2018
This commit is incomplete and needs further updates as sensu-go issues are resolved

sensu/sensu-go#1479
sensu/sensu-go#1461
sensu/sensu-go#1468
sensu/sensu-go#1099
treydock added a commit to treydock/sensu-puppet that referenced this issue May 31, 2018
This commit is incomplete and needs further updates as sensu-go issues are resolved

sensu/sensu-go#1479
sensu/sensu-go#1461
sensu/sensu-go#1468
sensu/sensu-go#1099
@sensu-discourse
Copy link

This issue has been mentioned on Sensu Community. There might be relevant details there:

https://discourse.sensu.io/t/can-we-update-subscriptions-of-entities-via-sensuctl/1852/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component:sensuctl Sensu CLI improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants