Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Machine ID changes after restart



  • Hello,

    we are trying to setup ProGet Free to run om an Almalinux virtual machine using podman (drop in replacement for docker), rootless mode. It runs fine by the way. The only issue is that when restarting the container there is a new Machine ID, which causes the Free License having to be reactivated. I have tried supplying a static mac address, but that does not make a difference.

    What is the Machine ID based on and how can I trouble shoot this? Any way to set a static Machine ID?

    BR,
    Jörgen



  • @jorgen-nilsson_1299

    I am running the docker container on Rocky 9 and here, the license keeps valid.

    Since rocky and alma are very similar, this must either be some difference of
    podman or related to how you exactly start the container.

    So:
    How exactly do you start your container(s)? I use quadlets - the recommended way on RHEL.

    Cheers
    -Fritz



  • As a reference and perhaps an example for how to run proget as quadlets, here are my config files for quadlets:

    1. /etc/containers/systemd/mssql.container
    [Unit]
    Description=Microsoft SQL server
    
    [Service]
    Restart=always
    # Extend Timeout to allow time to pull the image
    TimeoutStartSec=900
    
    [Container]
    Image=mcr.microsoft.com/mssql/server:2019-latest
    EnvironmentFile=/etc/mssql.env
    Volume=/var/data/mssql:/var/opt/mssql:U,Z
    Network=inedo.network
    HostName=inedo-sql
    
    [Install]
    WantedBy=multi-user.target
    
    1. /etc/containers/systemd/proget.container
    [Unit]
    Description=Inedo proget
    After=mssql.service
    Requires=mssql.service
    
    [Service]
    Restart=always
    # Extend Timeout to allow time to pull the image
    TimeoutStartSec=900
    
    [Container]
    Image=localhost/proget:current
    EnvironmentFile=/etc/proget.env
    Volume=/var/data/proget/backups:/var/proget/backups:z
    Volume=/var/data/proget/database:/var/proget/database:z
    Volume=/var/data/proget/extensions:/var/proget/extensions:z
    Volume=/var/data/proget/packages:/var/proget/packages:z
    Volume=/var/data/proget/ssl:/var/proget/ssl:z
    Volume=/etc/localtime:/etc/localtime:ro
    Network=inedo.network
    PublishPort=80:80
    HostName=proget
    
    [Install]
    WantedBy=multi-user.target
    
    1. /etc/containers/systemd/inedo.network
    [Network]
    

    Remarks:

    The Image in /etc/containers/systemd/proget.container is intentionally referencing a locally tagged image. This goes together with the following script for easily updating
    proget:

    #!/bin/bash
    set -e
    set -x
    systemctl stop proget
    sleep 5
    itag=latest
    if [ $# -eq 1 ] ; then
        itag=$1
    fi
    podman tag proget:current proget:previous
    podman pull proget.inedo.com/productimages/inedo/proget:${itag}
    podman tag proget.inedo.com/productimages/inedo/proget:${itag} proget:current
    systemctl start proget
    cat<<EOF
    Upgrade finished and proget started.
    Old image has benn tagged proget:previous
    EOF
    

    and: Obviously, the hierarchy below /var/data/proget has to be manually created in advance. /var/data/proget is on a separate virtual disk.

    Forgot the env files referenced in the .container files:

    /etc/mssql.env:

    ACCEPT_EULA=Y
    MSSQL_SA_PASSWORD=*****REDACTED*****
    MSSQL_PID=Express
    

    /etc/proget.env:

    PROGET_SQL_CONNECTION_STRING=Data Source=inedo-sql; Initial Catalog=ProGet; User ID=sa; Password=*****REDACTED*****
    TZ=Europe/Berlin
    

    Both are mode 0600, so that the passwords in there are a little bit more protected.

    And: Just after freshly setting it all up, I normally immediately migrate to embedded postgres and then remove the mssql container as well as the inedo network.

    Cheers
    -Fritz


  • inedo-engineer

    @jorgen-nilsson_1299 said in Machine ID changes after restart:

    What is the Machine ID based on and how can I trouble shoot this? Any way to set a static Machine ID?

    The Machine ID is based on the CPU Vendor ID, Machine Name (host name on Docker), and OS Version.

    Hopefully @felfert gave some advice on how to make sure those don't change,



  • @felfert Container started by

    podman run -d --name=proget -v ./proget-packages:/var/proget/packages:z -v ./proget-database:/var/proget/database:z -v ./proget-backups:/var/proget/backups:z -p 8624:80 proget
    

    But also tried:

    podman run -d --network=bridge:ip=<static-ip>,mac=<static-mac> --name=proget -v ./proget-packages:/var/proget/packages:z -v ./proget-database:/var/proget/database:z -v ./proget-backups:/var/proget/backups:z -p 8624:80 proget
    

    For now configured with systemd, but also if running the above on the command line I get the same results.

    Specifying the --hostname proget resolved the issue.

    podman run -d --hostname=proget --name=proget -v ./proget-packages:/var/proget/packages:z -v ./proget-database:/var/proget/database:z -v ./proget-backups:/var/proget/backups:z -p 8624:80 proget
    

    Thanks!


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation