-
Notifications
You must be signed in to change notification settings - Fork 339
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
Implement Network Settings for Ubuntu Core - closes #3155 #3168
base: master
Are you sure you want to change the base?
Conversation
ac18d67
to
514ff5b
Compare
I think I've been working on this long enough that I should probably get someone to start reviewing it! Sorry this is such a huge patch but it made sense to do it all in one go. @tim-hellhake I would value your input on this if you have time to review, if not let me know and I will try to find someone. Note that the build is currently failing in CI because the dbus npm package needs libdbus to build (libdbus-1-dev apt package on Debian-based distros). I'm not exactly sure where to add that in the GitHub Action. Maybe https://github.com/WebThingsIO/gateway/blob/master/.github/workflows/build.yml#L33 ? But I feel like apt packages may be installed somewhere else as well. If you want to give this a test drive then it should work on Ubuntu Deskop if you build from source locally as normal (need to Generating a snap package from this branch to test on Ubuntu Desktop is a bit more involved but if you want to try it:
The snap currently runs on port 8080 by default. The same snap should run on Ubuntu Core on the same architecture. |
README.md
Outdated
<!-- | ||
- On Fedora, Debian, Raspberry Pi OS, or Ubuntu, you can install the relevant .rpm or .deb package from the [releases page](https://github.com/WebThingsIO/gateway/releases). | ||
- On Arch Linux, you can install the [webthings-gateway AUR package](https://aur.archlinux.org/packages/webthings-gateway/). The PKGBUILD for this package can also be seen [here](https://github.com/WebThingsIO/gateway-aur). | ||
- Otherwise, you can build it from source yourself (see below). | ||
--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would delete this part completely
c9ea074
to
2c5068b
Compare
@tim-hellhake Thanks for the review! I addressed your comment and managed to get it to build in CI by adding the DBus dependency to the GitHub Action via apt. However, for some reason the integration tests appear to all pass but then the task times out after 6 hours! Any ideas what might be going on there? |
It does appear to be something in this PR which is causing the tests to time out, but I'm a bit stuck figuring out what it is. The actual tests seem to pass but then jest times out and eventually gets killed. The only idea I've had so far is that Dbus.getBus() is keeping something open that is preventing Jest from finishing. Maybe rather than opening that when the class is instantiated there should be some kind of init() method on Platform which is called when needed... but I'm really just guessing. |
Closes #3155
This PR implements a back end for network settings which works inside a snap running on Ubuntu or Ubuntu Core. It configures network settings using NetworkManager via its DBus API.
Previously all the Platform methods were synchronous but this introduces optional asynchronous versions of those methods.
The snap will require the
network-manager
andsystem-observe
snap interfaces, which must be connected in order for it to work.