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

[Bug] ipv4 address get set to null inside apps #2052

Open
BEMZ01 opened this issue Nov 11, 2024 · 0 comments
Open

[Bug] ipv4 address get set to null inside apps #2052

BEMZ01 opened this issue Nov 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@BEMZ01
Copy link

BEMZ01 commented Nov 11, 2024

Describe the bug

Hi, I've been trying to set up a database along side a crafty instance. I modified the docker-compose.yml file inside to contain a mariadb instance, then created a network as well and assigned an ip address to both instances. It works on the first start of the compose file through the casaos webpage, but a couple hours later, the docker-compose file is overwritten and the ipv4_address field gets replaced with null.

Original compose file

name: crafty
services:
    crafty:
        image: registry.gitlab.com/crafty-controller/crafty-4:latest
        ...
        networks:
            crafty:
                ipv4_address: 10.5.0.4
        ...
    database:
        image: mariadb:10.7
        ...
        networks:
            crafty:
                ipv4_address: 10.5.0.5
        ...
networks:
    crafty:
        name: crafty
        ipam:
            config:
                - subnet: 10.5.0.0/16
    default:
        name: crafty_default

Modified compose file

name: crafty
services:
    crafty:
        image: registry.gitlab.com/crafty-controller/crafty-4:latest
        ...
        networks:
            crafty: null
        ...
    database:
        image: mariadb:10.7
        ...
        networks:
            crafty: null
        ...
networks:
    crafty:
        name: crafty
        ipam:
            config:
                - subnet: 10.5.0.0/16
    default:
        name: crafty_default

To Reproduce

Steps to reproduce the behavior:

  1. Modify the docker-compose file as above to specify a custom network
  2. Assign the instances with static IP addresses
  3. Wait a little bit (Not to sure what causes this, maybe reloading the host?)
  4. Check the compose file. the network will be set to null, causing the instance to have an IP address assigned from DHCP

Expected behavior

The instances should persistently have an IP address assigned to them.

Desktop (please complete the following information):

 - OS: Ubuntu 24.04.1 LTS 
 - Browser FireFox 131.0.3 (64-bit)
 - Version Casaos v0.4.13 

System Time

               Local time: Mon 2024-11-11 09:56:32 UTC
           Universal time: Mon 2024-11-11 09:56:32 UTC
                 RTC time: Mon 2024-11-11 09:56:32
                Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
@BEMZ01 BEMZ01 added the bug Something isn't working label Nov 11, 2024
@BEMZ01 BEMZ01 changed the title [Bug] ipv4 address get set to null [Bug] ipv4 address get set to null inside apps Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant