-
Notifications
You must be signed in to change notification settings - Fork 98
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
Adguard home #397
base: master
Are you sure you want to change the base?
Adguard home #397
Conversation
@BrokenOnedroid is this different from what, for example our |
Well, reading the github page for it, it provides a matrix of same/different ... https://github.com/AdguardTeam/AdGuardHome Thanks for submitting this. I think it could be a complementary/alternative offering on Rockstor, since there is overlap but also a few key differences. |
updated description. Co-authored-by: Hooverdan96 <[email protected]>
set Version to 1.0 Co-authored-by: Kanec <[email protected]>
Using pi-hole didn't work as well for me as Adguard did. As I have already created the rock-on, I can also submit it. |
just moved the "!" out of the html code block
I don't see why adguard shouldn't be in Rockstor. |
I going to update the volumes. I checked them and there empty . |
@BrokenOnedroid Thanks for submitting this Rock-on - a nice counterpart to our Pi-hole by the looks of it. My tendency re our user visible wording is that we should tent to be brief. Working on what I hope will be an example of where I think we should be going on this front. Full agree that we should at least have a high-level (brief) description though of purpose though. Happy to publish once it has @Hooverdan96's say-so. |
changed the volume names to the correct ones.
@BrokenOnedroid One can move a pull request in and out of Draft mode: i.e. if it is a work-in-progress the draft status is good, and you can leave a comment as to remaining issues that you would like comment on etc. And once all looks to be working at your end, move the pull request out of draft status. I just noticed more changes since my last comment was all. Nice catch on those internal directories. Always good to check that intended persistent data is actually persisted :). |
@BrokenOnedroid I am probably doing something incorrectly, but somehow I can't connect to the web address of the adguard container. I created the macvlan using your example syntax (my machine also has eth0 as its NIC id) and configured and installed the adguard item. However, upon trying to connect to 192.168.178.58:3000 (from a different machine) it does not reach the container, pinging it also does not produce any results. Am I missing anything in particular? The docker logs show nothing unusual (i.e. no error messages). |
ok, I think I finally understood the macvlan values that might be needed. I ended up using the same network as the host (192.168.0.0/24), specified an address in that space (192.168.0.58/32) and used the gateway that the host is connected to (192.168.0.1). That then finally gave access to the initial configuration page at 192.168.0.58:3000. Fundamentally, I don't think any ports need to be mapped really, since this is running on the macvlan network and all ports are exposed by the application. I will test some more. |
meaning, it behaves like 3000 needs to be used once only for the initial setup/configuration of Adguard New test instance: creating macvlan network:
Test after install going to: http://172.16.0.254:3000 Confirming that configuration file in mapped share was created:
Pinging address from external machine is successful. However, macvlan is not allowing the host machine to connect to the address (isolation) directly. But setting AdGuard as the DNS server on the home router will prevent from this being a problem? @BrokenOnedroid any clarifications/suggestions, since you've been using it? I can't test this with my network setup without lots of effort at this time. as an aside on macvlans. Found this, but hopefully not necessary: |
@Hooverdan96 I am not using a second macvlan.
My guess is that unless you can add an IP or domain to the UI-Button setting, the Button won't work because the container does not use the same IP as the host (since it's using the macvlan) Is it possible to disable the UI-button for an container? |
Ok, that's good to know then, and I take that as proof that it will work as you described. Yes, you can actually just remove the If/when you or someone else can submit a write-up for this Rockon for the documentation, we can then pare back the description substantially and just reference to the documentation for details and examples. This would bring us then closer @phillxnet's intent on having less of the descriptions on the Rockon page itself. |
updated description for more instructions. for ease of use. removed all entries of '"ui": true'
Thanks for pushing the update @BrokenOnedroid. I tried it and it looks good. I'm thinking, since we now don't have any Rockstor WebUI relevant ports anymore, and the So I am proposing to remove the port section from the Rockon entirely (leaving the share mapping only). The initial port for access (3000) you've added to the description and the other ones can be found in the documentation (after some looking around). Does that make sense? |
Co-authored-by: Hooverdan96 <[email protected]>
@Hooverdan96 I removed the port defintion in my private installation and reinstalled the rockon. Seems to be working fine. |
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.
This works nicely. Retested it with this PR, I get the same screen sequence and setup path as before.
@phillxnet, functionalitywise it's working with substantially less input fields. In turn, the description has become somewhat bigger, but as mentioned before, if/when there is a writeup it could be linked to that and the details be removed. |
Tested via instructions provided in Rock-on Description only:
Confirmed via:
Install with default rights on clean shares gives a failed install:
Test machine was a Leap 15.6 KVM instance with Rockstor 5.0.15-0 rpm install. Any ideas on this one. Again, reluctant to publish as-is given there is only a failed install from a fresh install at my end. @Hooverdan96 The tested state of this Rock-on also exhibited for me: rockstor/rockstor-core#2913 which is expected given no envs. |
@phillxnet The logs for adguard are from a fresh install on newly created shares for config and data. System is running Rockstor version: 5.0.15-0 The only problem i ran into was removing and recreating the macvlan and then trying to start the existing rockon without deinstallation: |
which makes sense, since the UUID of the network is "tied" into the docker configuration. @phillxnet, what I found is, since I use a different gateway/IP address range, and my test instance was in yet another address space, I couldn't get it to come up. Once I sacrificed my "official" machine, and aligned the macvlan to my physical network, I had the same experience as @BrokenOnedroid showed above. So, not sure whether your test gateway was corresponding to the instruction example and hence caused some issues? the port message you listed above, I don't remember seeing that, and with the latest "look ma, no ports!" version I am surprised that this would even come up. But, then again I have not really used macvlans very much. |
So, and sorry to you @BrokenOnedroid for yet another change, may be in the description we should point out that:
While that is probably self-evident for a regular user of macvlans and someone that logically thinks about networking 😄, it wasn't to me until I read a bit more on that. @phillxnet what do you think? |
@Hooverdan96 I guess it would be easier to move the instructions into a write-up. The quantity of Text is bit to much. I think. And I'm going to take a look a creating a write-up. |
@BrokenOnedroid, thank you! Have some restful holidays. Just for reference, here's the usual location where write-ups for a number of Rockons has been placed: |
inserted link to write ups
Now that the corresponding documentation has been merged by @phillxnet here #517 this Rockon should be ready as well. @phillxnet, @BrokenOnedroid put the link to the |
@Hooverdan96 Re:
I think ideally so yes. That way we avoid folks then wondering what they are looking at: i.e. a list of stuff they know-not. So better if we link to the specific doc really. As to broken links post restructuring: we generally guard against this whenever we do a restructure via our redirect directive added by @FroggyFlox some time ago in "Reorganize Table Of Content ..., i.e. the following file: as the config for Like you did when we restructured/renamed our old v3 to v4 migration doc here:
|
@BrokenOnedroid I put a suggestion above with the direct link to your write-up. If agreed, commit suggestion and then @phillxnet can do a final review and hopefully merge this nice Rockon. |
Co-authored-by: Hooverdan96 <[email protected]>
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.
Just re-tested according to the new doc, i.e. creating the vlan before install, and change only the rights on the data share.
I get a failed install with the following result:
[25/Jan/2025 15:30:18] INFO [storageadmin.views.rockon:504] Rock-on definitions retrieved in: 0.11 seconds.
[25/Jan/2025 15:32:41] INFO [storageadmin.tasks:55] Now executing Huey task [install], id: ae7284d4-19db-4ead-ba23-e99bb1a225e0.
[25/Jan/2025 15:32:41] ERROR [system.osi:287] non-zero code(1) returned by command: ['/usr/bin/docker', 'stop', 'adguard']. output: [''] error: ['Error response from daemon: No such container: adguard', '']
[25/Jan/2025 15:32:41] ERROR [system.osi:287] non-zero code(1) returned by command: ['/usr/bin/docker', 'rm', 'adguard']. output: [''] error: ['Error response from daemon: No such container: adguard', '']
[25/Jan/2025 15:32:49] ERROR [system.osi:287] non-zero code(125) returned by command: ['/usr/bin/docker', 'run', '-d', '--restart=unless-stopped', '--name', 'adguard', '-v', '/mnt2/adguard_config:/opt/adguardhome/conf', '-v', '/mnt2/adguard_data:/opt/adguardhome/work', '-v', '/etc/localtime:/etc/localtime:ro', '--net=adguard-home', 'adguard/adguardhome:latest']. output: ['f74e0275c44118435690f20a11d6b00581ebaf72ce9e3acf9d132edff4e1ca39', ''] error: ['docker: Error response from daemon: failed to create the macvlan port: operation not supported.', '']
[25/Jan/2025 15:32:49] ERROR [storageadmin.views.rockon_helpers:206] Error running a command. cmd = /usr/bin/docker run -d --restart=unless-stopped --name adguard -v /mnt2/adguard_config:/opt/adguardhome/conf -v /mnt2/adguard_data:/opt/adguardhome/work -v /etc/localtime:/etc/localtime:ro --net=adguard-home adguard/adguardhome:latest. rc = 125. stdout = ['f74e0275c44118435690f20a11d6b00581ebaf72ce9e3acf9d132edff4e1ca39', '']. stderr = ['docker: Error response from daemon: failed to create the macvlan port: operation not supported.', '']
Traceback (most recent call last):
File "/opt/rockstor/src/rockstor/storageadmin/views/rockon_helpers.py", line 203, in install
globals().get("{}_install".format(rockon.name.lower()), generic_install)(rockon)
File "/opt/rockstor/src/rockstor/storageadmin/views/rockon_helpers.py", line 389, in generic_install
run_command(cmd, log=True)
File "/opt/rockstor/src/rockstor/system/osi.py", line 289, in run_command
raise CommandException(cmd, out, err, rc)
system.exceptions.CommandException: Error running a command. cmd = /usr/bin/docker run -d --restart=unless-stopped --name adguard -v /mnt2/adguard_config:/opt/adguardhome/conf -v /mnt2/adguard_data:/opt/adguardhome/work -v /etc/localtime:/etc/localtime:ro --net=adguard-home adguard/adguardhome:latest. rc = 125. stdout = ['f74e0275c44118435690f20a11d6b00581ebaf72ce9e3acf9d132edff4e1ca39', '']. stderr = ['docker: Error response from daemon: failed to create the macvlan port: operation not supported.', '']
[25/Jan/2025 15:32:49] INFO [storageadmin.tasks:63] Task [install], id: ae7284d4-19db-4ead-ba23-e99bb1a225e0 completed OK
So can't merge yet as can't install as per docs. What am I doing wrong here? And is this a doc or Rock-on issue?
The IP definitions I used now matches my local network according to the new doc:
i.e. local network as 192.168.2.0/24 so used:
pre-creation of vlan as per docs:
rleap15-6:~ # sudo docker network create -d macvlan --subnet=192.168.2.0/24 --ip-range=192.168.2.99/32 --gateway=192.168.2.1 -o parent=eth0 adguard-home
48fa51952b72063e1a157c4984475c268a66b90bc55013ae371055c3f0343583
Where 192.168.2.99 lies outside the DHCP range employed, and is not otherwise assigned/used, as the docs suggest.
Rockstor log:
[25/Jan/2025 15:30:18] INFO [storageadmin.views.rockon:504] Rock-on definitions retrieved in: 0.11 seconds.
[25/Jan/2025 15:32:41] INFO [storageadmin.tasks:55] Now executing Huey task [install], id: ae7284d4-19db-4ead-ba23-e99bb1a225e0.
[25/Jan/2025 15:32:41] ERROR [system.osi:287] non-zero code(1) returned by command: ['/usr/bin/docker', 'stop', 'adguard']. output: [''] error: ['Error response from daemon: No such container: adguard', '']
[25/Jan/2025 15:32:41] ERROR [system.osi:287] non-zero code(1) returned by command: ['/usr/bin/docker', 'rm', 'adguard']. output: [''] error: ['Error response from daemon: No such container: adguard', '']
[25/Jan/2025 15:32:49] ERROR [system.osi:287] non-zero code(125) returned by command: ['/usr/bin/docker', 'run', '-d', '--restart=unless-stopped', '--name', 'adguard', '-v', '/mnt2/adguard_config:/opt/adguardhome/conf', '-v', '/mnt2/adguard_data:/opt/adguardhome/work', '-v', '/etc/localtime:/etc/localtime:ro', '--net=adguard-home', 'adguard/adguardhome:latest']. output: ['f74e0275c44118435690f20a11d6b00581ebaf72ce9e3acf9d132edff4e1ca39', ''] error: ['docker: Error response from daemon: failed to create the macvlan port: operation not supported.', '']
[25/Jan/2025 15:32:49] ERROR [storageadmin.views.rockon_helpers:206] Error running a command. cmd = /usr/bin/docker run -d --restart=unless-stopped --name adguard -v /mnt2/adguard_config:/opt/adguardhome/conf -v /mnt2/adguard_data:/opt/adguardhome/work -v /etc/localtime:/etc/localtime:ro --net=adguard-home adguard/adguardhome:latest. rc = 125. stdout = ['f74e0275c44118435690f20a11d6b00581ebaf72ce9e3acf9d132edff4e1ca39', '']. stderr = ['docker: Error response from daemon: failed to create the macvlan port: operation not supported.', '']
Traceback (most recent call last):
File "/opt/rockstor/src/rockstor/storageadmin/views/rockon_helpers.py", line 203, in install
globals().get("{}_install".format(rockon.name.lower()), generic_install)(rockon)
File "/opt/rockstor/src/rockstor/storageadmin/views/rockon_helpers.py", line 389, in generic_install
run_command(cmd, log=True)
File "/opt/rockstor/src/rockstor/system/osi.py", line 289, in run_command
raise CommandException(cmd, out, err, rc)
system.exceptions.CommandException: Error running a command. cmd = /usr/bin/docker run -d --restart=unless-stopped --name adguard -v /mnt2/adguard_config:/opt/adguardhome/conf -v /mnt2/adguard_data:/opt/adguardhome/work -v /etc/localtime:/etc/localtime:ro --net=adguard-home adguard/adguardhome:latest. rc = 125. stdout = ['f74e0275c44118435690f20a11d6b00581ebaf72ce9e3acf9d132edff4e1ca39', '']. stderr = ['docker: Error response from daemon: failed to create the macvlan port: operation not supported.', '']
[25/Jan/2025 15:32:49] INFO [storageadmin.tasks:63] Task [install], id: ae7284d4-19db-4ead-ba23-e99bb1a225e0 completed OK
All shares, including rockon-root were created prior to the install test.
My apologies if I've missed something obvious here.
@Hooverdan96 & @BrokenOnedroid On my review and experience to date here:
Could this be an artifact of my particular KVM setup. The test system in this case is running in a KVM instance which itself has an eth0 that is bridged to the local network. Maybe this is exercising a limitation of the particular approach taken by this docker arrangement? Given you have both apparently proven function here. @Hooverdan96 if you review and find all is dandy, I'm happy to merge and publish based on that, as we can at least then get this out for broader testing/experimentation/feedback. |
I'll take a look shortly. I've been running my tests using Virtualbox that contains a bridged adapter. But that might not be the same as your bridged eth0 setup. |
I continue to run into issue accessing the macvlan in the virtual machine, though, despite that the network shows as available, because, if I understand correctly, without introducing some workaround I can't get to it from the host due to the shared network adapter. In any case, I went ahead (again, like I did further up during the first tests) and did the testing on a designated Rockstor testing machine, creating the macvlan, install the Rockon and I end up at the installation page and am able to configure everything as before. So, I think, for now this can be merged. If there's a simple enough workaround on how to run this on a VM and access it/manage it, then this could be added to the documentation subsequently. |
Well, here's the workaround for VirtualBox at least. The bridged adapter defined for the VM needs to be set to Find the relevant adapter (altname), e.g.: then set up the macvlan network considering the host's associated gateway, subnet and a specific IP address like in the instructions. That should now allow for "outside" system to access the starting page/admin page after setup. This is good for testing. To make this behavior permanent, from what I found one could likely use one of the two methods described here: I tried method 2 (creating a service unit) and that seems to work. I created the service unit as:
and put this in there (assuming that the connection name was
but maybe there's a better option. |
General information on project
This pull request proposes to add a new rock-on for the following project:
Fixes New Rockon using AdGuard Home #403
Information on docker image
Checklist
root.json
in alphabetical order (for new rock-on only)"description"
object lists and links to the docker image used"description"
object provides information on the image's particularities (advantage over another existing rock-on for the same project, for instance)"website"
object links to project's main website