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

ubuntu.sh: No automatic removal of modemmanager #13156

Merged
merged 1 commit into from
Apr 21, 2020

Conversation

hamishwillee
Copy link
Contributor

Removing the modemmanager was done to allow firmware upload on any board. However this not needed when working with many boards because they are registered with the manager, and it is not good practice to just remove a feature someone might be using.

So removing this, and will add a note in the docs. If we run into specific boards that aren't covered we'll request they be registered.

As discussed in #13111

@julianoes
Copy link
Contributor

Thanks @hamishwillee.

Test results by @MaEtUgR were mixed. So we need to - unfortunately - revisit this.

@hamishwillee
Copy link
Contributor Author

Test results by @MaEtUgR were mixed. So we need to - unfortunately - revisit this.

Thanks. My take on this is that you were correct; if a significant number of people use this module then silently removing it is evil.

There are lots of options though:

  1. We loudly remove it (end of script warning)
  2. We remove it based on user acknowledgement of prompt, but only on real systems - ie not on docker.
  3. We add instructions in manual on how to do this in manual, explaining the problem.
  4. We add instructions on how to to do this in the install script.
  5. We add timeout in the upload script and put possible source of problem/solution in a note.

Probably some of the above might happen even if we are also to add the known FC board ids to modem managers. Thoughts?

@julianoes
Copy link
Contributor

If we can workaround it by some timeout (5.) that would preferred to me. Otherwise, I like suggestion 1. or 2.

@hamishwillee
Copy link
Contributor Author

@MaEtUgR @julianoes Re #13156 (comment)

So who best understands the uploader script? A timeout on that makes sense?

If we do go the way of making removal of modemmanager conditional on the user how do you add a query in a bash script? I think the rest of the check is OK ...

# detect if running in docker
if [ ! -f /.dockerenv ]; then

	if [[ ! INSTALL_NUTTX == "false" ]]; then
        echo "modem-manager may interfere with uploading firmware. Should we remove it?";
        #HERE code to check user prompt and optionally remove component.
	fi
    
fi

@MaEtUgR
Copy link
Member

MaEtUgR commented Oct 15, 2019

I'd personally go with 2. prompt the user if modemmanager is installed and it's not docker.
To have it working even with the manager would be the nicest BUT I'd rather have the suboptimal but reliable removal of the module (with alert) than a slower uploader that might break again in certain situations.

@julianoes
Copy link
Contributor

julianoes commented Oct 15, 2019

I'm running modemmanager and uploading firmware to a Pixracer just fine. I don't experience any problems.

mmcli --version
mmcli 1.10.6

@hamishwillee
Copy link
Contributor Author

@MaEtUgR @julianoes the uploader would be no slower. In the fail case it would actually be effectively faster, because it actually ends :-). I think you could reasonably argue that the absence of a timeout is a bug irrespective of this discussion.

This is my preference because it moves the problem to the place where it is relevant, and means that it only gets highlighted when there is actually a problem.
But then I don't propose to do the work - I propose to create a firmware bug and assign it to one of you two. Would one of you do the work?

If the answer to above is no, then I will fix up the script as per 2.

@stale
Copy link

stale bot commented Jan 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Jan 13, 2020
@stale stale bot removed the stale label Apr 21, 2020
@LorenzMeier LorenzMeier merged commit 95779ea into master Apr 21, 2020
@LorenzMeier LorenzMeier deleted the hamishwillee-patch-1 branch April 21, 2020 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants