Project

General

Profile

Actions

Bug #44502

closed

mgr/dashboard: 'dashboard ac-user-create' is not idempotent

Added by Sage Weil about 4 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Urgent
Category:
General - Configuration
Target version:
% Done:

0%

Source:
Tags:
Backport:
octopus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

2020-03-07T15:12:41.196 INFO:teuthology.orchestra.run.smithi137.stderr:INFO:cephadm:Non-zero exit code 17 from /bin/podman run --rm --net=host -e CONTAINER_IMAGE=quay.io/ceph-ci/ceph:f7e57709a70012f57105c919d9d28c9c454d3ba5 -e NODE_NAME=smithi137 -v /var/log/ceph/dc231be0-6085-11ea-9a34-001a4aab830c:/var/log/ceph:z
 -v /tmp/ceph-tmpktpe2zce:/etc/ceph/ceph.client.admin.keyring:z -v /tmp/ceph-tmp6xjdjrab:/etc/ceph/ceph.conf:z --entrypoint /usr/bin/ceph quay.io/ceph-ci/ceph:f7e57709a70012f57105c919d9d28c9c454d3ba5 dashboard ac-user-create admin 3pjswr2wq1 administrator --force-password
2020-03-07T15:12:41.196 INFO:teuthology.orchestra.run.smithi137.stderr:INFO:cephadm:/usr/bin/ceph:stderr Error EEXIST: User 'admin' already exists
2020-03-07T15:12:41.202 INFO:teuthology.orchestra.run.smithi137.stderr:Traceback (most recent call last):
2020-03-07T15:12:41.202 INFO:teuthology.orchestra.run.smithi137.stderr:  File "/home/ubuntu/cephtest/cephadm", line 3700, in <module>
2020-03-07T15:12:41.202 INFO:teuthology.orchestra.run.smithi137.stderr:    r = args.func()
2020-03-07T15:12:41.202 INFO:teuthology.orchestra.run.smithi137.stderr:  File "/home/ubuntu/cephtest/cephadm", line 2072, in command_bootstrap
2020-03-07T15:12:41.202 INFO:teuthology.orchestra.run.smithi137.stderr:    '--force-password'])
2020-03-07T15:12:41.203 INFO:teuthology.orchestra.run.smithi137.stderr:  File "/home/ubuntu/cephtest/cephadm", line 1922, in cli
2020-03-07T15:12:41.203 INFO:teuthology.orchestra.run.smithi137.stderr:    ).run(timeout=timeout)
2020-03-07T15:12:41.203 INFO:teuthology.orchestra.run.smithi137.stderr:  File "/home/ubuntu/cephtest/cephadm", line 1679, in run
2020-03-07T15:12:41.203 INFO:teuthology.orchestra.run.smithi137.stderr:    self.run_cmd(), desc=self.entrypoint, timeout=timeout)
2020-03-07T15:12:41.203 INFO:teuthology.orchestra.run.smithi137.stderr:  File "/home/ubuntu/cephtest/cephadm", line 516, in call_throws
2020-03-07T15:12:41.203 INFO:teuthology.orchestra.run.smithi137.stderr:    raise RuntimeError('Failed command: %s' % ' '.join(command))
2020-03-07T15:12:41.203 INFO:teuthology.orchestra.run.smithi137.stderr:RuntimeError: Failed command: /bin/podman run --rm --net=host -e CONTAINER_IMAGE=quay.io/ceph-ci/ceph:f7e57709a70012f57105c919d9d28c9c454d3ba5 -e NODE_NAME=smithi137 -v /var/log/ceph/dc231be0-6085-11ea-9a34-001a4aab830c:/var/log/ceph:z -v /tmp/ceph-tmpktpe2zce:/etc/ceph/ceph.client.admin.keyring:z -v /tmp/ceph-tmp6xjdjrab:/etc/ceph/ceph.conf:z --entrypoint /usr/bin/ceph quay.io/ceph-ci/ceph:f7e57709a70012f57105c919d9d28c9c454d3ba5 dashboard ac-user-create admin 3pjswr2wq1 administrator --force-password

/a/sage-2020-03-07_14:00:00-rados-master-distro-basic-smithi/4834652

all of these CLI commands need to be idempotent, so that if the CLI experiences a connection interruption and resends the command to the mon/mgr it will still succeed.


Related issues 2 (1 open1 closed)

Related to Dashboard - Bug #44806: mgr/dashboard: check if all CLI commands are idempotentNew

Actions
Copied to Dashboard - Backport #44796: octopus: mgr/dashboard: 'dashboard ac-user-create' is not idempotentResolvedTatjana DehlerActions
Actions #1

Updated by Sage Weil about 4 years ago

/a/sage-2020-03-10_00:56:37-rados:thrash-old-clients-wip-sage-testing-2020-03-09-1832-distro-basic-smithi/4842895
/a/sage-2020-03-10_00:56:37-rados:thrash-old-clients-wip-sage-testing-2020-03-09-1832-distro-basic-smithi/4842904

Actions #2

Updated by Tiago Melo about 4 years ago

For example the rbd just returns a message without the Error

╰─# bin/ceph osd pool create rbd 8                                               
*** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH ***
2020-03-10T09:47:04.703+0000 7fc008a9d700 -1 WARNING: all dangerous and experimental features are enabled.
2020-03-10T09:47:04.731+0000 7fc008a9d700 -1 WARNING: all dangerous and experimental features are enabled.
pool 'rbd' already exists
╭─root@ceph-1 /ceph/build ‹wip-update-npm› 
╰─# ceph dashboard ac-user-create admin 3pjswr2wq1 administrator --force-password
*** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH ***
2020-03-10T09:47:08.542+0000 7f6b830d3700 -1 WARNING: all dangerous and experimental features are enabled.
2020-03-10T09:47:08.574+0000 7f6b830d3700 -1 WARNING: all dangerous and experimental features are enabled.
Error EEXIST: User 'admin' already exists

Actions #3

Updated by Volker Theile about 4 years ago

IMO such a command should never be idempotent.

╭─root@ceph-octopus-docker / 
╰─# getent passwd | grep sshd
sshd:x:480:480:SSH daemon:/var/lib/sshd:/bin/false
╭─root@ceph-octopus-docker / 
╰─# useradd sshd
useradd: user 'sshd' already exists
╭─root@ceph-octopus-docker / 
╰─# echo $?                                                                                                                                          9 ↵
9
Actions #4

Updated by Neha Ojha about 4 years ago

  • Category set to 158
Actions #5

Updated by Lenz Grimmer about 4 years ago

  • Assignee set to Tatjana Dehler

We concluded to not return with a non-zero exit code, but print a clear error message.

Actions #6

Updated by Tatjana Dehler about 4 years ago

  • Status changed from New to In Progress
  • Pull request ID set to 34247
Actions #7

Updated by Tatjana Dehler about 4 years ago

  • Subject changed from 'dashboard ac-user-create' is not idempotent to mgr/dashboard: 'dashboard ac-user-create' is not idempotent
Actions #8

Updated by Sage Weil about 4 years ago

  • Status changed from In Progress to Pending Backport
  • Backport set to octopus
Actions #9

Updated by Konstantin Shalygin about 4 years ago

  • Copied to Backport #44796: octopus: mgr/dashboard: 'dashboard ac-user-create' is not idempotent added
Actions #10

Updated by Tatjana Dehler about 4 years ago

  • Related to Bug #44806: mgr/dashboard: check if all CLI commands are idempotent added
Actions #11

Updated by Lenz Grimmer about 4 years ago

  • Target version set to v16.0.0
Actions #12

Updated by Nathan Cutler about 4 years ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Actions #13

Updated by Ernesto Puerta about 3 years ago

  • Project changed from mgr to Dashboard
  • Category changed from 158 to General - Configuration
Actions

Also available in: Atom PDF