Unable to update stor2rrd on docker

picodon
edited February 2022 in STOR2RRD
Hi,

I tried to update my stor2rrd container from v7.20 to the latest v7.31-9, as well as with v7.30, and the container keeps on failing after restart (see docker logs below).
It seems that it cannot find the app in the default path though that's where the app is...

I ran back the v7.20 and it worked again.

Any help on how to update the container (without losing existing data) would be appreciated.

Thanks!

--- run v7.31-9
docker logs stor2rrd -f

Running for the first time.. need to configure...
Product upgrade under user : "stor2rrd"

Where is the product actually located [/home/stor2rrd/stor2rrd]: The product has not been found in: /home/stor2rrd/stor2rrd
-bash: line 1: ./load.sh: No such file or directory
Product upgrade under user : "stor2rrd"

Where is the product actually located [/home/stor2rrd/stor2rrd]: The product has not been found in: /home/stor2rrd/stor2rrd
-bash: line 1: ./load.sh: No such file or directory
2022-02-16 21:02:25,553 WARN For [program:rsyslog], stdout_logfile=syslog but this is deprecated and will be removed.  Use stdout_syslog=true to enable syslog instead.
2022-02-16 21:02:25,554 WARN For [program:rsyslog], stderr_logfile=syslog but this is deprecated and will be removed.  Use stderr_syslog=true to enable syslog instead.
2022-02-16 21:02:25,554 WARN For [program:apache2], stdout_logfile=syslog but this is deprecated and will be removed.  Use stdout_syslog=true to enable syslog instead.
2022-02-16 21:02:25,554 WARN For [program:apache2], stderr_logfile=syslog but this is deprecated and will be removed.  Use stderr_syslog=true to enable syslog instead.
2022-02-16 21:02:25,554 WARN For [program:cron], stdout_logfile=syslog but this is deprecated and will be removed.  Use stdout_syslog=true to enable syslog instead.
2022-02-16 21:02:25,554 WARN For [program:cron], stderr_logfile=syslog but this is deprecated and will be removed.  Use stderr_syslog=true to enable syslog instead.
2022-02-16 21:02:25,554 INFO Set uid to user 0 succeeded
2022-02-16 21:02:25,557 INFO supervisord started with pid 63
2022-02-16 21:02:26,560 INFO spawned: 'apache2' with pid 64
2022-02-16 21:02:26,563 INFO spawned: 'cron' with pid 65
2022-02-16 21:02:26,567 INFO spawned: 'rsyslog' with pid 66
2022-02-16 21:02:26,630 INFO exited: apache2 (exit status 1; not expected)
2022-02-16 21:02:27,633 INFO spawned: 'apache2' with pid 71
2022-02-16 21:02:27,633 INFO success: cron entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-02-16 21:02:27,633 INFO success: rsyslog entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-02-16 21:02:27,683 INFO exited: apache2 (exit status 1; not expected)
2022-02-16 21:02:29,687 INFO spawned: 'apache2' with pid 73
2022-02-16 21:02:29,732 INFO exited: apache2 (exit status 1; not expected)
2022-02-16 21:02:32,738 INFO spawned: 'apache2' with pid 75
2022-02-16 21:02:32,786 INFO exited: apache2 (exit status 1; not expected)
2022-02-16 21:02:33,787 INFO gave up: apache2 entered FATAL state, too many start retries too quickly


--- run v7.20
docker logs stor2rrd -f

Running for first time.. need to configure...
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
Product upgrade under user : "stor2rrd"

Where is the product actually located [/home/stor2rrd/stor2rrd]: Backing up original version : 7.20 to /home/stor2rrd/stor2rrd/BACKUP-INSTALL/stor2rrd-7.20
Saving actual configuration
Copy new version to the target destination
Configuring new stor2rrd.cfg
Setting file/dir permissions, it might take some time in huge environments
chmod -R o+r,o+x /home/stor2rrd/stor2rrd/data


Warning: increase stack ulimit for stor2rrd user, it is actually too low (8192 kB)
Assure that the same limits has even the web user (apache/nobody/http)
  under root: vi /etc/security/limits.conf and set 512 MB
    @stor2rrd       hard    stack           524288
    @stor2rrd       soft    stack           524288


Upgrade to version 7.20 is done

Wait about 15 - 20 minutes, to get fresh data from the storages

Then build a new GUI:

  cd /home/stor2rrd/stor2rrd
  ./load.sh 2>&1 | tee logs/load.out-initial

Wait for finishing of that, then refresh the GUI (Ctrl-F5)


Looks like there has been an upgrade to 7.20, run time will be longer this time....

Comments

  • Hello,

    how do you run xorux/stor2rrd ? Are you using volumes to keep data persistant?

    Please send us output of this on running 7.20 container:
    docker exec -ti your_container_name ls -al /home

    Thanks

  • Hi,

    I do use persistent volumes in my docker config:
    stor2rrd:
      image: xorux/stor2rrd
      name: stor2rrd
      published_ports:
        - 8080:80
        - 8443:443
      volumes:
        - "/opt/stor2rrd:/home/stor2rrd/stor2rrd/data:rw"
        - "/etc/stor2rrd:/home/stor2rrd/stor2rrd/etc:rw"
        - "/var/log/stor2rrd:/home/stor2rrd/stor2rrd/logs:rw"
      memory: 512M
      pull: true
      restart_policy: always
     
    docker exec -it stor2rrd ls -al /home
    total 16
    drwxr-xr-x    1 root     root          4096 Feb 23  2021 .
    drwxr-xr-x    1 root     root          4096 Feb 16 21:04 ..
    drwxr-sr-x    6 stor2rrd stor2rrd      4096 Feb 16 21:37 stor2rrd

    Thanks for the help!
  • Hello, 

    don't know if this can work, we recommend to use sigle volume for the whole /home/stor2rrd directory, installer is checking various files to decide if it's first run or upgrade.
     
    You can make symlinks to logs/ and etc/ if you want to keep it like in your current cfg.

    You could try to stop the container, run the new one based on the latest image (with single volume for /home/stor2rrd) and then copy (or move) data/ and etc/ to the right places in that volume, it should work. Make a copy or snapshot if you move, just to be sure.

    You can even upgrade STOR2RRD itself from the UI, but it shouldn't be persistant if you remove and create container again (like K8s do)



  • Hi,

    I did all the changes and was able to update the app after moving all the data in the same mounted volume.

    FYI after the update the metrics collection wasn't running... I checked the crontab inside the container and the paths for certain jobs were incorrect: using "lpar2rrd" instead of "stor2rrd".

    I edited the crontab and it works again... maybe an issue?

    Thanks for your help!


    su stor2rrd
    crontab -l

    #  STOR2RRD STORAGES
    ######################################################

    # GUI
    03,33 * * * * /home/lpar2rrd/stor2rrd/load.sh > /home/lpar2rrd/stor2rrd/logs/load.out 2>&1

    # IBM DS8000 storage agent
    0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/lpar2rrd/stor2rrd/load_ds8perf.sh > /home/lpar2rrd/stor2rrd/load_ds8perf.out 2>&1

    # IBM SVC/Storwize/Flash storage agent
    0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/lpar2rrd/stor2rrd/load_svcperf.sh > /home/lpar2rrd/stor2rrd/load_svcperf.out 2>&1

    # DS500/DS4000/DS3000/DCS3700 & NetApp E-series storage agent
    0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/lpar2rrd/stor2rrd/load_ds5perf.sh > /home/lpar2rrd/stor2rrd/load_ds5perf.out 2>&1

    # IBM XIV storage agent
    0,10,20,30,40,50 * * * * /home/lpar2rrd/stor2rrd/load_xivperf.sh > /home/lpar2rrd/stor2rrd/load_xivperf.out 2>&1

    # Hitachi HUS and AMS 2000 storage agent
    0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/lpar2rrd/stor2rrd/load_husperf.sh > /home/lpar2rrd/stor2rrd/load_husperf.out 2>&1

    # HPE 3PAR storage agent
    0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/lpar2rrd/stor2rrd/load_3parperf.sh > /home/lpar2rrd/stor2rrd/load_3parperf.out 2>&1

    # NetApp storage agent
    0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/lpar2rrd/stor2rrd/load_netappperf.sh > /home/lpar2rrd/stor2rrd/load_netappperf.out 2>&1

    # Hitachi VSP-G  & HPE XP7 storage agent
    0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/lpar2rrd/stor2rrd/load_vspgperf.sh > /home/lpar2rrd/stor2rrd/load_vspgperf.out 2>&1

    # EMC VMAX
    0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/stor2rrd/stor2rrd/load_vmaxperf.sh > /home/stor2rrd/stor2rrd/load_vmaxperf.out 2>&1

    # EMC VNX block
    0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/stor2rrd/stor2rrd/load_vnxperf.sh > /home/stor2rrd/stor2rrd/load_vnxperf.out 2>&1

    # EMC VNX file
    0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/stor2rrd/stor2rrd/load_vnxfperf.sh > /home/stor2rrd/stor2rrd/load_vnxfperf.out 2>&1

    # EMC VNXe
    0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/stor2rrd/stor2rrd/load_vnxeperf.sh > /home/stor2rrd/stor2rrd/load_vnxeperf.out 2>&1

    # EMC Unity
    0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/stor2rrd/stor2rrd/load_unityperf.sh > /home/stor2rrd/stor2rrd/load_unityperf.out 2>&1

    # Dot Hill AssuredSAN and its rebrands like Lenovo S2200 or HPE MSA2000/P2000
    0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/stor2rrd/stor2rrd/load_dothillperf.sh > /home/stor2rrd/stor2rrd/load_dothillperf.out

    # Dell SC series (Compellent)
    0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/stor2rrd/stor2rrd/load_compellentperf.sh > /home/stor2rrd/stor2rrd/load_compellentperf.out 2>&1
  • Hello,

    you're are right, there are mismatched usernames in crontab file, I'll fix & push ASAP and let you know. We're taking crontab file from VMware image where both applications run under the same user (lpar2rrd), it's confusing...

    Thanks for reporting


  • Hello, 

    it's fixed in the latest xorux/stor2rrd

  • Hi!
    Glad I could help and Thanks for the quick fix :)
Sign In or Register to comment.