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

remoteit/tasks/enable-or-disable.yml: Don't fail if svc(s) missing #3363

Merged
merged 1 commit into from
Sep 8, 2022

Conversation

holta
Copy link
Member

@holta holta commented Sep 8, 2022

This PR allows remoteit_enabled: False to be enforced without failing, e.g. after remote.it "Device Package" 4.15.2 (released yesterday) is installed by apt.

Just FYI:

  1. Most IIAB users/operators won't know to touch /etc/remoteit/registration prior to running apt dist-upgrade (or, equivalently apt install remoteit) and so apt will visually provide them a remote.it "Claim Code" (whether they want it or not!)

  2. They should however then (if they choose!) retain the option of running the following, to turn off remote.it services:

    cd /opt/iiab/iiab
    ./runrole remoteit
    

Building on:

@holta holta added the bug label Sep 8, 2022
@holta holta added this to the 8.0 milestone Sep 8, 2022
@holta
Copy link
Member Author

holta commented Sep 8, 2022

This PR allows remoteit_enabled: False to be enforced without failing

cd /opt/iiab/iiab
./runrole remoteit

FYI prior to merging this PR, this (new) error would result trying to stop & disable systemd service connectd :

TASK [remoteit : Disable & Stop remote.it services {connectd, schannel}] *******
failed: [127.0.0.1] (item=connectd) => {"ansible_loop_var": "item", "changed": false, "item": "connectd", "msg": "Could not find the requested service connectd: host"}
changed: [127.0.0.1] => (item=schannel)

@holta holta merged commit 4d434a1 into iiab:master Sep 8, 2022
@holta
Copy link
Member Author

holta commented Sep 8, 2022

README for those wanting more details:

https://github.com/iiab/iiab/tree/master/roles/remoteit#readme

@jvonau
Copy link
Contributor

jvonau commented Sep 12, 2022

When would the remoteit role ever be used a second time once installed given the push to use the helper scripts? The need to 'touch' 'registration' would not be needed if the file was not removed post install.

@holta
Copy link
Member Author

holta commented Sep 12, 2022

When would the remoteit role ever be used a second time once installed given the push to use the helper scripts? The need to 'touch' 'registration' would not be needed if the file was not removed post install.

Just talked to @jvonau about this.

It's somewhat complicated by the fact that /etc/remoteit/registration and remoteit_enabled: False are both independently acting as very similar flags, somewhat violating SSOT.

On the bright side, the current state of affairs isn't tragic, in that remote.it is somewhat over-advertised, pushing IIAB operators to get to know the product if they run apt update and then apply those updates every fews months, entirely at their own risk.

On the negative side, these 2 flags are somewhat contradicting, so I'll think about whether a cleaner alignment of these 2 flags (i.e. both flags co-habiting with each other in a more sane way) can be enacted without too much complication.

@holta
Copy link
Member Author

holta commented Sep 17, 2022

complicated by the fact that /etc/remoteit/registration and remoteit_enabled: False are both independently acting as very similar flags, somewhat violating SSOT

Just a clarification:

Both enable-or-disable.yml and /usr/bin/iiab-remoteit will need to be substantially reworked, if we go ahead with this simple-but-not-quite-so-simple change (-:

Long Story Short: /etc/remoteit/registration cannot be ruthlessly wiped, as it might contain valid remote.it registration.
So a number of conditionals would need to be set up, to act on the existence of this file — but only if it contains zero bytes.

Recap: I'm not against the idea, but it will/would require deliberate/careful design thinking (and quite a number of testing paths to verify!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants