-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Decomission the upnp container and bring it into hm-config #164
Comments
@vpetersson IMO this should be in hm-config not hm-diag. Because UPnP requires host networking and so does config. Whereas diag doesn't |
Also @vpetersson I don't think we need to run UPnP every 12 hours. We can just run it once at container start up |
Yeah, you're right. I was thinking this would solve the IP announcement with Helium, but those are two separate issues altogether. Just mixed them up in my head. |
So, are we moving this task into hm-config? |
What about this: while(regionID is None):
# While no region set
try:
with open("/var/pktfwd/region", 'r') as regionOut:
regionFile = regionOut.read()
if(len(regionFile) > 3):
print("Frequency: " + str(regionFile))
regionID = str(regionFile).rstrip('\n')
break
print("Invalid Contents")
sleep(60)
print("Try loop again")
except FileNotFoundError:
print("File Not Detected, Sleeping")
sleep(60) Should we really wait for it before enabling UPnP? |
Yes we should. We don't want host networking in diag container IMO |
Moved it now @MuratUrsavas |
Also, @vpetersson I'm running this task only once at the container startup like @shawaj said. Is that cool? |
Yeah that's fine. I confused the uPNP container with the IP logic that resides in the miner. |
Right now I'm testing the changes and can see that hm-config container is listening port 44158 for uPnP. But HOST OS does not report the same (Checking from Balena Dashboard terminals). Is this the expected behavior? |
uPNP shouldn't require any open/listening ports. All it does is to send a packet to the router where it asks to do a port forwarding to port 44158 on the device sending it ( Port 44158 is the port of the miner and not hm-config. |
This is interesting. The command you've mentioned is there right now and I'm seeing 44158 is listened in hm-config. Since gateway-config container is in Host network mode, it could be showing hm-miner's listening port? Could it be the case? |
Yes, because of host networking, so you're picking up the one from hm-miner. hm-config doesn't have any ports exposed explicitly. |
Got it! Looks like this PR could make it into current sprint. |
@vpetersson I have a question about FIRMWARE_VERSION parameter. I've changed it in If we should keep it, then what's the rule? |
It's just for building and testing locally I think |
@MuratUrsavas yeah so this is a bit confusing and I think we should overhaul this. At this point, we only care about exposing the Helium Miner Software In the future, we will be introducing the semantic versioning for Helium Miner Software (NebraLtd/helium-miner-software#351), which will make this a bit more human readable. |
@shawaj if that's the case then maybe we should consider removing it from all sub-repo's. IMHO it's a source of conflict. Maybe we could create MICRO_SERVICE_VERSION parameter or a similar one for that purpose later. |
@MuratUrsavas it needs to be FIRMWARE_VERSION because the codebase looks for that specific environment variable. The actual content of that variable is irrelevant. It could just be We don't ever use the local repo docker compose for anything other than testing. |
@vpetersson this is not correct. Firmware version is the miner version. That is needed in both config and diag and possibly some of the other containers. But we put the firmware version into every container so that the containers have an environment variable update every time we push an update so the containers are all restarted. |
But the same environment variable also comes from helium-miner-software and the current one is overridden (AFAIK) by it. So we'll always have a FIRMWARE_VERSION parameter coming from main repo, unless the sub container is solely working just by itself. |
@shawaj good point about pushing this to all containers. That's true. That said, we want to move away from using the Helium Miner Version as our version tracker in favor of a Nebra flavored Semantic Version. This is the first step towards this. (This Issue is the wrong issue to discuss this in fwiw.) |
The docker-compose.yml in this repo is never used when building for the actual fleet (testnet or mainnet). It's only ever used for local building and/or just as a reference on how the container needs to be run. Maybe good to rename it to docker-compose-example.yml or something |
OK, this short discussion opened the way for me and I'm creating PR's right now. |
Ah I see what you mean. Yeah this |
Done and merged to master. |
* feat: Removed hm-upnp container. Its task is now carried by hm-config (NebraLtd/hm-config#164) * Bumped the hm-config version * Update Raspberry Pi docker compose output * Update ROCK Pi docker compose output Co-authored-by: Murat Ursavas <[email protected]> Co-authored-by: Murat Ursavaş <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Merged into production, closing the issue. |
Background
We currently have a container running on the miners with the sole purpose of enabling uPNP. We can quickly just sunset this in favor of a single command in this repo.
It is however worth noting that this will be unnecessary once we move to light miners, but the timeline for this keeps slipping.
Acceptance Criteria
docker-compose.yml
The text was updated successfully, but these errors were encountered: