Upgrade Scripts for non-interactive major release upgrades (2->3, 3->4, 4->5)

  • Does anyone have any idea ?

  • Does anyone have any idea ?

    Why are you hijacking this thread if your problem is not related to doing an upgrade? Please open a new thread in an appropriate sub-forum and I'm sure you will find people helping you. Necessary information might be the package version of php-fpm installed and possible the contents of the nginx log files and maybe daemon.log.

  • dleidert , thanks one again for the great work in helping with the upgrade process. Much appreciated.


    I have noticed that in the upgrade from 4 to 5, I now have PHP7.0 and PHP7.3. That apparently leads to the following in my log file every 30 minutes:


    Code
    Apr 12 14:39:01 NAS CRON[30249]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
    Apr 12 14:39:06 NAS systemd[1]: Starting Clean php session files...
    Apr 12 14:39:07 NAS sessionclean[30250]: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/pam.so' - /usr/lib/php/20151012/pam.so: cannot open shared object file: No such file or directory in Unknown on line 0
    Apr 12 14:39:07 NAS sessionclean[30250]: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/pam.so' - /usr/lib/php/20151012/pam.so: cannot open shared object file: No such file or directory in Unknown on line 0
    Apr 12 14:39:07 NAS sessionclean[30250]: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/pam.so' - /usr/lib/php/20151012/pam.so: cannot open shared object file: No such file or directory in Unknown on line 0
    Apr 12 14:39:07 NAS systemd[1]: phpsessionclean.service: Succeeded.    

    I have read that uninstalling PHP7.0 is the way to go, but that breaks the web interface and requires a reinstall of omv-extras. Any change of including the uninstall of PHP in your script? Or maybe it is already there, but my PHP7.0 was in use by something else?

  • Well, but then omv-extras has probably not been upgraded when it gets broken by removing php7.0. You reported that the upgrade was interrupted on your system due to a missing repository key. You haven't described in detail what you did. Maybe you didn't really finish the upgrade process?

  • Well, but then omv-extras has probably not been upgraded when it gets broken by removing php7.0. You reported that the upgrade was interrupted on your system due to a missing repository key. You haven't described in detail what you did. Maybe you didn't really finish the upgrade process?

    Good point. My upgrade halted due to a program I had added in omvextras Plugin way back and had forgotten about. During the upgrade, I guess it tried to update that program but a change in how to update the program caused it to fail. But the logging was very clear so I upgraded that program and ran the script from where it left off. But it is entirely possible that might have caused some other issue that I did not notice.


    On the other hand, there do seem to be several posts by people with this same issue after upgrading from 3->4 or 4->5. The old PHP version is not uninstalled (probably because it is still in use) and a newer version is added. While everything works just fine still, it does cause some errors to be spit out in the logs. Probably not even worth doing anything about, but I am a bit OCD when it comes to error messages. ;)


    Here is an example: LINK

  • Hello,

    I tried to use your script to update my OMV 4=>5 from a distant PC

    I followed sceen tips, etc... but when I wanted to run the script I had the following issues:

    1. sudo ./omv-release-upgrade-5 ==> permission denied, even if I put +x permissions

    2. sudo sh ./omv-release-upgrade-5 ==> no error output, but seems that nothing happens.

    the log file has only one line: 2021-04-30T11:17:17,318554976+02:00


    Any ideas on what is wrong ?

    thank you

    JR


    EDIT: Solved! as indicated elsewhere, my /homes partition had a noexec flag! now everything is OK and migration done!

  • Hey all


    Have just updated my omv from 4.7 to 5.6.5-1. After rebooting the system and logging back into the Ui it came up with "The configuration has been changed. You must apply the changes in order for them to take effect.". So i try to apply the changers with no luck it keeps come up with a "An error has occurred" please find the details below. Any help with fixing this issue will appreciated


    Screenshots below


    Error #0:

    OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; omv-salt deploy run --no-color avahi 2>&1' with exit code '1': Destiny.flat.intranet: Data failed to compile:

    ---------- Rendering SLS 'base:omv.deploy.avahi.services.nfs' failed: Jinja error: shares: The value ' ' is not an object.

    Traceback (most recent call last): File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 497, in render_jinja_tmpl output = template.render(**decoded_context) File "/usr/lib/python3/dist-packages/jinja2/asyncsupport.py", line 76, in render return original_render(self, *args, **kwargs) File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1008, in render return self.environment.handle_exception(exc_info, True) File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 780, in handle_exception reraise(exc_type, exc_value, tb) File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise raise value.with_traceback(tb) File "<template>", line 21, in top-level template code File "/usr/lib/python3/dist-packages/jinja2/sandbox.py", line 438, in call return __context.call(__obj, *args, **kwargs) File "/usr/lib/python3/dist-packages/salt/loader.py", line 1235, in __call__ return self.loader.run(run_func, *args, **kwargs) File "/usr/lib/python3/dist-packages/salt/loader.py", line 2268, in run return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs) File "/usr/lib/python3/dist-packages/salt/loader.py", line 2283, in _run_as return _func_or_method(*args, **kwargs) File "/var/cache/salt/minion/extmods/modules/omv_conf.py", line 39, in get objs = db.get(id_, identifier) File "/usr/lib/python3/dist-packages/openmediavault/config/database.py", line 85, in get query.execute() File "/usr/lib/python3/dist-packages/openmediavault/config/database.py", line 726, in execute self._response = self._elements_to_object(elements) File "/usr/lib/python3/dist-packages/openmediavault/config/database.py", line 487, in _elements_to_object result.validate() File "/usr/lib/python3/dist-packages/openmediavault/config/object.py", line 236, in validate self.model.validate(self.get_dict()) File "/usr/lib/python3/dist-packages/openmediavault/config/datamodel.py", line 202, in validate self.schema.validate(data) File "/usr/lib/python3/dist-packages/openmediavault/json/schema.py", line 175, in validate self._validate_type(value, schema, name) File "/usr/lib/python3/dist-packages/openmediavault/json/schema.py", line 229, in _validate_type raise last_exception File "/usr/lib/python3/dist-packages/openmediavault/json/schema.py", line 200, in _validate_type self._validate_object(value, schema, name) File "/usr/lib/python3/dist-packages/openmediavault/json/schema.py", line 305, in _validate_object self._check_properties(value, schema, name) File "/usr/lib/python3/dist-packages/openmediavault/json/schema.py", line 519, in _check_properties self._validate_type(value[propk], propv, path) File "/usr/lib/python3/dist-packages/openmediavault/json/schema.py", line 229, in _validate_type raise last_exception File "/usr/lib/python3/dist-packages/openmediavault/json/schema.py", line 200, in _validate_type self._validate_object(value, schema, name) File "/usr/lib/python3/dist-packages/openmediavault/json/schema.py", line 303, in _validate_object % ("NULL" if (value is None) else str(value)),

    openmediavault.json.schema.SchemaValidationException: shares: The value ' ' is not an object.

    ; line 21

    ---

    [...]

    #

    # You should have received a copy of the GNU General Public License

    # along with OpenMediaVault. If not, see <http://www.gnu.org/licenses/>.

    {% set nfs_export_dir = salt['pillar.get']('default:OMV_NFSD_EXPORT_DIR', '/export') %}

    {% set nfs_config = salt['omv_conf.get']('conf.service.nfs') %} <======================

    {% set nfs_zeroconf_enabled = salt['pillar.get']('default:OMV_NFSD_ZEROCONF_ENABLED', 1) %}

    {% set nfs_zeroconf_name = salt['pillar.get']('default:OMV_NFSD_ZEROCONF_NAME', '%h - NFS') %}

    remove_avahi_service_nfs: module.run:

    [...]

    --- in /usr/share/php/openmediavault/system/process.inc:195

    Stack trace:

    #0 /usr/share/php/openmediavault/engine/module/serviceabstract.inc(62): OMV\System\Process->execute()

    #1 /usr/share/openmediavault/engined/rpc/config.inc(167): OMV\Engine\Module\ServiceAbstract->deploy()

    #2 [internal function]: Engined\Rpc\Config->applyChanges(Array, Array)

    #3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)

    #4 /usr/share/php/openmediavault/rpc/serviceabstract.inc(149): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)

    #5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(588): OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatusse...', '/tmp/bgoutput4m...')

    #6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(159): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))

    #7 /usr/share/openmediavault/engined/rpc/config.inc(189): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)

    #8 [internal function]: Engined\Rpc\Config->applyChangesBg(Array, Array)

    #9 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)

    #10 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)

    #11 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)

    #12 {main}

  • My upgrade from 4 > 5 seems to be running, but in the log, it did end with the following


    Code
    run-parts: executing /root/openmediavault-upgrade-4.7/post.d/71-restart-services
    Failed to enable unit: Unit file docker.service does not exist.
    run-parts: /root/openmediavault-upgrade-4.7/post.d/71-restart-services exited with return code 1


    So I rebooted after letting it sit a few minutes to confirm it had run it's course. To my surprise it booted normally and I can get into OMV. Ran various updates and I cannot find anything wrong. Anything I should check in on , other than checking to see if what I needed is working?

  • Hello,

    Many thanks for this version update script.

    As far as I'm concerned I'll try to go from 4 to 5
    Currently I have the following services running, do I have to stop them all as a precaution?

    I backed up the OS with the OMV Backup option in DD format in case

    AMD Ryzen 5 2400G on Asus TUF B450M-PLUS - 8Gb RAM - 3 * 3To RAID5 on LSI Megaraid SAS 9260-8i and 3 SSD in Fractal Design Node 804 Black
    OS: OMV 4.1.26-1

  • Just wanted to say Thanks, the upgrade from 4 to 5 went smoothly with this script, the only issue i had was the old quota system was not loading because the new Systemd version was already loading it. quick google search solved this issue and now i'm on the latest and greatest as they say.

  • Hi guys,


    I tried to update form OMV 4 to 5 using your script but it failed with this error log:



    I tried to re-run the 81-apt-dist-upgrade-omv, but failed again. Any ideas how to proceed and where it could be the problem?

  • Hello,


    I'm testing an upgrade from 3.0.99 to 4 using a clonezilla backup running into VMware.


    Before running the script I have:

    - purged/removed: mysql, shellinabox and backup

    - commented out the content in /etc/apt/sources.list.d/openmediavault-kernel-backports.list

    - checked apt-get update was running without error


    and I have NOT "Disable all services running on the OMV machine except for SSH" (I will do it when doing the upgrade of my real omv server).


    The update seemed to work, I can log in the webgui, reinstall and try shellinabox (I was not sure it was still compatible with omv4), save&apply some setting changes (disable auto logout).


    All the services I had on v3.0.99 are there and running except NFS (enabled but not running. I guess this is just because my data disks are not present in this vitualized clone ?)


    However I have a few errors in the upgrade script log and I wonder if I should do something about it before continuing to test ugrading from 4 to 5 this time ?


    Here is the log:


    It seems most of those lines are related to the known python 3.5 issue ? (I have read a bit about it)

    But mywebsql is about something else ?


    Should I do/fix something before testing upgrading to omv5 ?


    edit:

    Below is the result of dpkg -l | grep openm after the 3.0.99>4 upgrade:


    Code
    ii libopenmpt0:amd64 0.2.7386~beta20.3-3+deb9u4 amd64 module music library based on OpenMPT -- shared library
    ii openmediavault 4.1.36-1 all openmediavault - The open network attached storage solution
    ii openmediavault-keyring 1.0 all GnuPG archive keys of the OpenMediaVault archive
    ii openmediavault-minidlna 3.3.11 all OpenMediaVault miniDLNA (DLNA server) plugin
    ii openmediavault-omvextrasorg 4.1.16 all OMV-Extras.org Package Repositories for OpenMediaVault
    ii openmediavault-shellinabox 3.4 all Web-based SSH client.
    ii openmediavault-unionfilesystems 4.0.2 all Union filesystems plugin for OpenMediaVault.


    Thank you.

  • what about Docker? I've heard there is no Docker plugin for OMV5 and you're supposed to use Portainer for managing containers. So if I update from OMV4 to OMV5, what happens to my containers? Can I transfer them to Portainer without having to punch in every option for every container manually?

  • I tried to re-run the 81-apt-dist-upgrade-omv, but failed again.

    this script is trying to upgrade Debian OS, to help more details are required
    i.e. output of executing 81-apt-dist-upgrade-omv

    omv 5.6.16-1 (usul) on RPi4/4GB with Kernel 5.10.17 and WittyPi 3 V2 RTC HAT

    2x 6TB HDD formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

  • use Portainer for managing containers.

    I'd suggest that you familiarize yourself a bit more with Portainer documentation, this way you can answer the question quickly

    omv 5.6.16-1 (usul) on RPi4/4GB with Kernel 5.10.17 and WittyPi 3 V2 RTC HAT

    2x 6TB HDD formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

  • what about Docker? I've heard there is no Docker plugin for OMV5 and you're supposed to use Portainer for managing containers. So if I update from OMV4 to OMV5, what happens to my containers? Can I transfer them to Portainer without having to punch in every option for every container manually?

    The docker plugin doesn't store container info. Portainer doesn't store container info. Docker stores container info. So, when you upgrade, docker isn't removed meaning your containers stay around. When you install Portainer, it "sees" all of the containers because Docker tells it about them. So, you shouldn't have a problem. Yacht works the same way and is intended to be a bit simpler than portainer.

    omv 5.6.13 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.2 | kvm plugin 5.1.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!