attempting to add the same unit twice

Bug #1901160 reported by Bin Li
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Canonical Certification Client
Fix Released
Critical
Jonathan Cave

Bug Description

After install the checkbox20 from stable or edge, it will show below error.

$ sudo cdts.test-runner·
=========================[ Resume Incomplete Session ]==========================
There is 1 incomplete session that might be resumed
Do you want to resume session 'session_title-2020-10-19T02.38.01'?
  r => resume this session
  n => next session
  c => create new session
  d => delete old sessions
[rncd]: c
Preparing...
ERROR:plainbox.bug:Undeclared exception ValueError raised from start_new_session
Traceback (most recent call last):
  File "/snap/checkbox20/current/bin/checkbox-cli", line 8, in <module>
    sys.exit(main())
  File "/snap/checkbox20/current/lib/python3.8/site-packages/checkbox_ng/launcher/checkbox_cli.py", line 123, in main
    subcmd.invoked(ctx)
  File "/snap/checkbox20/current/lib/python3.8/site-packages/checkbox_ng/launcher/subcommands.py", line 204, in invoked
    self._start_new_session()
  File "/snap/checkbox20/current/lib/python3.8/site-packages/checkbox_ng/launcher/subcommands.py", line 349, in _start_new_session
    self.ctx.sa.start_new_session(title, UnifiedRunner, runner_kwargs)
  File "/snap/checkbox20/current/lib/python3.8/site-packages/plainbox/impl/decorators.py", line 142, in wrapper
    raise exc
  File "/snap/checkbox20/current/lib/python3.8/site-packages/plainbox/impl/decorators.py", line 136, in wrapper
    return func(*args, **kwargs)
  File "/snap/checkbox20/current/lib/python3.8/site-packages/plainbox/impl/session/assistant.py", line 470, in start_new_session
    self._context.add_provider(provider)
  File "/snap/checkbox20/current/lib/python3.8/site-packages/plainbox/impl/session/state.py", line 416, in add_provider
    self.add_unit(unit, False)
  File "/snap/checkbox20/current/lib/python3.8/site-packages/plainbox/impl/session/state.py", line 434, in add_unit
    raise ValueError(
ValueError: attempting to add the same unit twice: com.canonical.certification::client-cert-16-04

Related branches

Revision history for this message
Bin Li (binli) wrote :

Looks the cdts and checkbox20 defined the client-cert-16-04 at the same time.

cdts/10/providers/plainbox-provider-certification-client/bin/canonical-certification-cli:8:unit = com.canonical.certification::client-cert-16-04
cdts/10/providers/plainbox-provider-certification-client/bin/canonical-certification-client:8:unit = com.canonical.certification::client-cert-16-04
cdts/10/providers/plainbox-provider-certification-client/units/client-cert-16-04.pxu:1:id: client-cert-16-04

checkbox20/275/providers/plainbox-provider-certification-client/bin/canonical-certification-cli:8:unit = com.canonical.certification::client-cert-16-04
checkbox20/275/providers/plainbox-provider-certification-client/bin/canonical-certification-client:8:unit = com.canonical.certification::client-cert-16-04
checkbox20/275/providers/plainbox-provider-certification-client/units/client-cert-desktop-16-04.pxu:1:id: client-cert-16-04

Revision history for this message
Bin Li (binli) wrote :

commit e3ceecd67bb41f83be70782d01bdcb349b28cea3
Author: Jonathan Cave <email address hidden>
Date: Mon Oct 5 13:55:56 2020 +0100

    snapcraft.yaml: remove certification-client

    This provider will be in future checkbox core snap releases
    so should be removed from this snap.

diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 8f887cb..196f09a 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -39,10 +39,6 @@ passthrough:
       command-chain: [bin/wrapper_local]

 parts:
- plainbox-provider-certification-client:
- plugin: checkbox-provider
- source-type: git
- source: git://git.launchpad.net/plainbox-provider-certification-client
   launchers:
     plugin: dump
     source: launchers/

Revision history for this message
Bin Li (binli) wrote :

So I installed the cdts from 20.40/edge while not latest/edge. And found the plainbox-provider-certification-client was removed. But there are another issue. The test-runner couldn't find checkbox-cli-wrapper.

cdts 0.6dev 58 20.04/edge ce-certification-qa classic

$ sudo cdts.test-runner·
/usr/bin/env: ‘checkbox-cli-wrapper’: No such file or directory

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

oh and for the record @binli never run checkbox with sudo cdts.test-runner, checkbox snap via the install hook should take care of installing a sudoer rule for the ubuntu user

Revision history for this message
Bin Li (binli) wrote :

@sylain,

 Thanks for your reply. And I also try to run without sudo, it's same result.

$ cdts.test-runner
/usr/bin/env: ‘checkbox-cli-wrapper’: No such file or directory

Jonathan Cave (jocave)
Changed in plainbox-provider-certification-client:
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Jonathan Cave (jocave)
Revision history for this message
Jonathan Cave (jocave) wrote :

Candidate builds for version 0.6 are now on the beta channels for all tracks of cdts

Revision history for this message
Bin Li (binli) wrote :

@Jonathan,

 I installed the cdts from 20.04/beta, it works perfect and the 'checkbox-cli-wrapper' issue is fixed. Thanks a lot!

Changed in plainbox-provider-certification-client:
milestone: none → 0.44.0
status: Confirmed → Fix Committed
Changed in plainbox-provider-certification-client:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.