Merge ~pieq/checkbox-ng:checkbox-remote-nomenclature into checkbox-ng:master

Proposed by Pierre Equoy
Status: Needs review
Proposed branch: ~pieq/checkbox-ng:checkbox-remote-nomenclature
Merge into: checkbox-ng:master
Diff against target: 297 lines (+67/-71)
6 files modified
checkbox_ng/urwid_ui.py (+4/-4)
docs/configs.rst (+7/-7)
docs/index.rst (+1/-1)
docs/launcher-tutorial.rst (+3/-3)
docs/remote.rst (+38/-42)
docs/service-daemon.rst (+14/-14)
Reviewer Review Type Date Requested Status
Jonathan Cave (community) Needs Fixing
Review via email: mp+427277@code.launchpad.net

Description of the change

Replaced master/slave with remote/service nomenclature. Sometimes, "device" is used instead of "service" when it makes more sense.

Tests run:

For the docs: built the documentation locally using `./setup.py build_sphinx -b html` and verified that the changes were taken into account.

For checkbox-ng: launched the modified `checkbox-cli remote`, pressed Ctrl+C and verified that there was no more mention of mater/slave.

Note: in the device-daemon.rst file, there are still a few commands that mention slave, but they are related to Checkbox-snappy which is deprecated and is planned to be removed at any point, so I decided to leave the commands like this for now and once the removal of checkbox-snappy happens[1], these commands will be adjusted.

[1] https://warthogs.atlassian.net/browse/CHECKBOX-88

To post a comment you must log in.
Revision history for this message
Jonathan Cave (jocave) wrote :

Some suggestions included inline.

There may be some more uses of "Device" that I missed where I would consider using DUT or service as appropriate.

These really are opinion though and understand others probably have differing opinions

review: Needs Fixing
Revision history for this message
Jonathan Cave (jocave) wrote :

Having looked at some other docs recently, I find it frustrating that we mix use of SUT in some of our docs and DUT in others. I don't think this helps with general confusion about overloaded terms.

I would be really helpful if we could have a common glossary for Cert.

Revision history for this message
Jeff Lane  (bladernr) wrote :

I have used SUT out of habit since I started here, I had never heard
DUT until more closely interacting with the IoT team. I definitely
agree on needing common nomenclature for things so that everyone knows
exactly what is being described.

On Tue, Aug 16, 2022 at 9:06 AM Jonathan Cave
<email address hidden> wrote:
>
> Having looked at some other docs recently, I find it frustrating that we mix use of SUT in some of our docs and DUT in others. I don't think this helps with general confusion about overloaded terms.
>
> I would be really helpful if we could have a common glossary for Cert.
> --
> https://code.launchpad.net/~pieq/checkbox-ng/+git/checkbox-ng/+merge/427277
> Your team Checkbox Administrators is subscribed to branch checkbox-ng:master.
>
> Launchpad-Message-Rationale: Subscriber @checkbox-admins
> Launchpad-Message-For: checkbox-admins
> Launchpad-Notification-Type: code-review
> Launchpad-Branch: ~checkbox-dev/checkbox-ng/+git/checkbox-ng:master
> Launchpad-Project: checkbox-ng
>

--
Jeff Lane
Engineering Manager
IHV/OEM Alliances and Server Certification

"Entropy isn't what it used to be."

Unmerged commits

df178e9... by Pierre Equoy

Change:urwid: Use Remote and Device instead of Master and Slave

eceaec1... by Pierre Equoy

Change:docs: use Remote and Device terms instead of Master and Slave

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/checkbox_ng/urwid_ui.py b/checkbox_ng/urwid_ui.py
2index 9d4af34..fd8ec41 100644
3--- a/checkbox_ng/urwid_ui.py
4+++ b/checkbox_ng/urwid_ui.py
5@@ -691,11 +691,11 @@ def interrupt_dialog(host):
6 ('start', 'dark green,bold', 'black'),
7 ]
8 choices = [
9- _("Cancel the interruption and resume the session (ESC)"),
10+ _("Cancel the interruption and resume the session (Esc)"),
11 _("Kill test in progress and move on to next"),
12- _("Disconnect the master (Same as CTRL+C)"),
13- _("Stop the checkbox slave @{}".format(host)),
14- _("Abandon the session on the slave @{}".format(host)),
15+ _("Disconnect the remote (Same as Ctrl+C)"),
16+ _("Stop the Checkbox service @{}".format(host)),
17+ _("Abandon the session on the device @{}".format(host)),
18 ]
19 footer_text = [
20 ('Press '), ('start', '<Enter>'), (' or '),
21diff --git a/docs/_images/interrupt.png b/docs/_images/interrupt.png
22index e17390b..d8dc521 100644
23Binary files a/docs/_images/interrupt.png and b/docs/_images/interrupt.png differ
24diff --git a/docs/configs.rst b/docs/configs.rst
25index 0bf3b41..43ef652 100644
26--- a/docs/configs.rst
27+++ b/docs/configs.rst
28@@ -28,16 +28,16 @@ value resolution is as follows:
29 Configs with Checkbox Remote
30 ============================
31
32-When the Checkbox Slave starts, it looks for config files in the same places
33-that local Checkbox session would look (on the Slave side).
34-If the Master uses a Launcher, then the values from that Launcher take
35-precedence over the values from configs on the Slave side.
36+When the Checkbox Device starts, it looks for config files in the same places
37+that local Checkbox session would look (on the Device side).
38+If the Remote uses a Launcher, then the values from that Launcher take
39+precedence over the values from configs on the Device side.
40
41 Example:
42
43 ::
44
45- # checkbox.conf on the Slave
46+ # checkbox.conf on the Device
47
48 [environment]
49 FOO = 12
50@@ -45,7 +45,7 @@ Example:
51
52 ::
53
54- # Launcher used by the master
55+ # Launcher used by the Remote
56
57 # (...)
58 [environment]
59@@ -53,5 +53,5 @@ Example:
60
61 A Checkbox job that runs ``echo $FOO $BAR`` would print ``42 6``
62
63-Note that ``BAR`` is still available even though Master used Launcher that did
64+Note that ``BAR`` is still available even though Remote used Launcher that did
65 not define it.
66diff --git a/docs/index.rst b/docs/index.rst
67index 4d39664..7cb67c9 100644
68--- a/docs/index.rst
69+++ b/docs/index.rst
70@@ -61,7 +61,7 @@ Table of contents
71 understanding.rst
72 tutorials.rst
73 remote.rst
74- slave-daemon.rst
75+ service-daemon.rst
76 units/index.rst
77 bugs.rst
78 stack.rst
79diff --git a/docs/launcher-tutorial.rst b/docs/launcher-tutorial.rst
80index ec5339a..2692e78 100644
81--- a/docs/launcher-tutorial.rst
82+++ b/docs/launcher-tutorial.rst
83@@ -381,14 +381,14 @@ Daemon-specific configuration
84 ``[daemon]``
85
86 Beginning of the daemon-specific section.
87-Settings in this section only apply to sessions that are run by checkbox-slave
88-spawned as a daemon.
89+Settings in this section only apply to sessions that are run by checkbox
90+service spawned as a daemon.
91
92 ``normal_user``
93
94 Username to use when job doesn't specify which user to run as.
95
96-Checkbox-slave daemon is run by root so in order to run some jobs as an
97+Checkbox service daemon is run by root so in order to run some jobs as an
98 unprivileged user this variable can be used.
99
100
101diff --git a/docs/remote.rst b/docs/remote.rst
102index 4d97c0b..5cbc7c9 100644
103--- a/docs/remote.rst
104+++ b/docs/remote.rst
105@@ -23,73 +23,69 @@ Remote sends lean data only.
106 Nomenclature
107 ============
108
109-*Checkbox Slave* - the Checkbox instance that runs on the System or Device
110-under test and _executes_ the tests.
111+**Checkbox Device**: the Checkbox instance that runs on the System or Device
112+Under Test (SUT/DUT) and **executes** the tests.
113
114-*Checkbox Master* - Checkbox instance that controls the execution of tests on
115-the Slave, such as a laptop.
116+**Checkbox Remote**: Checkbox instance that controls the execution of tests on
117+the Device, such as a laptop.
118
119 Invocation:
120- Slave:
121- ``checkbox-cli slave``
122+ Device:
123+ ``checkbox-cli service``
124
125- Master:
126- ``checkbox-cli master HOST [/PATH/TO/LAUNCHER]``
127+ Remote:
128+ ``checkbox-cli remote HOST [/PATH/TO/LAUNCHER]``
129
130- HOST can be an IP or a hostname that your device can resolve.
131+ ``HOST`` can be an IP or a hostname that your device can resolve.
132
133- LAUNCHER (optional) a launcher file to use that exists somewhere on the
134- machine you are using as the Master.
135+ ``LAUNCHER`` (optional) a launcher file to use that exists somewhere on the
136+ machine you are using as the Remote.
137
138
139 Example:
140- ``checkbox-cli master dut8.local /home/ubuntu/testplans/sutton-client``
141+ ``checkbox-cli remote dut8.local /home/ubuntu/testplans/sutton-client``
142
143 Custom port
144 ===========
145
146-By default Slave listens on port 18871. To change that ``--port`` option can be
147-used. The same option used on Master specifies which port to connect to.
148+By default Device listens on port 18871. To change that ``--port`` option can be
149+used. The same option used on Remote specifies which port to connect to.
150
151 Example:
152- ``checkbox-cli slave --port 10101``
153+ ``checkbox-cli service --port 10101``
154
155- ``checkbox-cli master dut8.local --port 10101``
156+ ``checkbox-cli remote dut8.local --port 10101``
157
158 Session control
159 ===============
160
161- While Master is connected, sending SIGINT (hitting ctrl+c) to the application
162- invokes the interrupt screen:
163+While Remote is connected, sending SIGINT (hitting ``Ctrl+C``) to the application
164+invokes the interrupt screen:
165
166 .. image:: _images/interrupt.png
167
168- First action is "Cancel the interruption", which returns to the session (Does
169- nothing). You can also press ESC on the Interruption screen to select that
170- action.
171-
172- Second action is "Disconnect the master". It leaves the session on the Slave
173- running, but the Master exits. You can also hit ctrl+c again to select that
174- action (terminate the master). You can reconnect to the Slave and resume
175- testing like the interruption never happened.
176-
177- Third action is "Stop the Checkbox slave". It stops the session and terminates
178- the Checkbox process on the Slave. It also stops the master.
179-
180- Fourth action is "Abandon the session". It stops and _removes_ the session on
181- the Slave and immediately starts another one. After the new session is started
182- Master is greeted with test plan selection screen. This is a good moment to
183- disconnect the master if you wish to run testing at a later time.
184+- "Cancel the interruption": returns to the session (does nothing). You can
185+ also press the ``Esc`` key on the Interruption screen to select that action.
186+- "Disconnect the remote": leaves the session on the Device running, but the
187+ Remote exits. You can also hit ``Ctrl+C`` again to select that action
188+ (terminate the Remote). You can reconnect to the Device and resume testing as
189+ if the interruption never happened.
190+- "Stop the Checkbox service". It stops the session and terminates the Checkbox
191+ process on the Device. It also stops the Remote.
192+- "Abandon the session": stops and **removes** the session on the Device and
193+ immediately starts another one. After the new session is started, Remote is
194+ greeted with the test plan selection screen. This is a good moment to
195+ disconnect the Remote if you wish to run testing at a later time.
196
197 Remote session characteristics
198 ==============================
199
200-Differences between remote session and a local one are:
201+Differences between a remote session and a local one are:
202
203- * Unless session is explicitly abandoned, Checkbox Slave always resumes the
204- last session.
205- * After testing is done, Slave starts another session
206- * Submission is done from the Master by default
207- (use: ``local_submission = No`` in launcher or config to change that)
208- * When Master reconnects mid interactive test, the test is restarted.
209- * Hitting ctrl+c in Master doesn't interrupt the running test.
210+- Unless session is explicitly abandoned, Checkbox Device always resumes the
211+ last session.
212+- After testing is done, Device starts another session.
213+- Submission is done from the Remote by default (use: ``local_submission = No``
214+ in launcher or config to change that).
215+- When Remote reconnects mid-interactive test, the test is restarted.
216+- Hitting ``Ctrl+C`` in Remote doesn't interrupt the running test.
217diff --git a/docs/slave-daemon.rst b/docs/service-daemon.rst
218similarity index 74%
219rename from docs/slave-daemon.rst
220rename to docs/service-daemon.rst
221index 33ddd34..6ecb64e 100644
222--- a/docs/slave-daemon.rst
223+++ b/docs/service-daemon.rst
224@@ -1,10 +1,10 @@
225-.. _daemonic_slave:
226+.. _daemonic_service:
227
228-Checkbox Slave Daemon Service
229-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
230+Checkbox Daemon Service
231+^^^^^^^^^^^^^^^^^^^^^^^
232
233 Checkbox snaps supporting Checkbox Remote functionality usually come with a
234-Systemd service that can ensure Checkbox Slave is loaded and active.
235+Systemd service that can ensure Checkbox is loaded and active.
236
237 .. note::
238
239@@ -44,32 +44,32 @@ To disable the daemon run
240 Stopping the daemon
241 ===================
242
243-If you wish to stop currently running Slave instance, run
244+If you wish to stop currently running Device instance, run
245
246 .. code-block:: bash
247
248 $ sudo systemctl stop snap.checkbox-snappy.remote-slave.service
249
250-Or press ctrl+c on the Master controlling that particular slave, and select
251-``stop the checkbox slave @your_host``.
252+Or press ``Ctrl+C`` on the Remote controlling that particular Device, and select
253+``stop the Checkbox device @your_host``.
254
255-Note that if the Daemon is enabled, the Slave will go back up after a reboot.
256+Note that if the Daemon is enabled, the Device will go back up after a reboot.
257
258
259 Troubleshooting
260 ===============
261
262 Whenever you have a problem with misbehaving daemon, it's advisable to start
263-troubleshooting by restarting the host running the Slave.
264+troubleshooting by restarting the host running the Device.
265
266-Daemon looks enabled but I cannot connect to it from the master
267+Daemon looks enabled but I cannot connect to it from the remote
268 ---------------------------------------------------------------
269
270 Check if the daemon is enabled:
271
272 .. code-block:: bash
273
274- $ snap get checkbox-snappy slave
275+ $ snap get checkbox-snappy service
276
277 Check if the service is enabled:
278
279@@ -81,15 +81,15 @@ The output should state it's ``active (running)``.
280
281 If it's not running, make sure the service and the Daemon are enabled.
282
283-Master connects but I'm seeing wrong test plans
284+Remote connects but I'm seeing wrong test plans
285 -----------------------------------------------
286
287 There is a chance that you have two services running that compete to listen
288 on the default port.
289
290-Try listing statuses of all Checkbox Slave services and make sure only one is
291+Try listing statuses of all Checkbox Device services and make sure only one is
292 running.
293
294 .. code-block:: bash
295
296- $ sudo systemctl status '*checkbox*slave*'
297+ $ sudo systemctl status '*checkbox*service*'

Subscribers

People subscribed via source and target branches