2017-07-24 06:33 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001677openmediavaultBugpublic2017-07-06 10:44
ReporterT-Dawg2 
Assigned Tovotdev 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionnot fixable 
PlatformOSDebianOS VersionJessie
Product Version 
Target VersionFixed in VersionErasmus (3.x) 
Summary0001677: OMV3: Attempted update to 3.0.59 gives sed unterminated command error
DescriptionTrying to upgrade from 3.0.13 to 3.0.59 through standard apt upgrade procedure gives the following error which errors out the apt process:

Installing new version of config file /etc/cron.weekly/openmediavault-update-smart-drivedb ...
Installing new version of config file /etc/default/openmediavault ...
Installing new version of config file /etc/openmediavault/php.ini ...
Installing new version of config file /etc/pam.d/openmediavault ...
Installing new version of config file /etc/pam.d/openmediavault-webgui ...
Installing new version of config file /etc/php5/fpm/pool.d/openmediavault-webgui.conf ...
Updating configuration ...
sed: -e expression #1, char 91: unterminated `s' command
dpkg: error processing package openmediavault (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 openmediavault
Steps To ReproduceUpgrade from 3.0.13 to 3.0.59
Tagserasmus
Product build
Attached Files
  • txt file icon omv-upgrade-3.0.15.txt (4,407 bytes) 2017-06-13 16:56 -
    + . /usr/share/openmediavault/scripts/helper-functions
    + . /etc/default/openmediavault
    + OMV_CONFIG_FILE=/etc/openmediavault/config.xml
    + OMV_CONFIG_TEMPLATE_FILE=/usr/share/openmediavault/templates/config.xml
    + OMV_PRODUCTINFO_FILE=/usr/share/openmediavault/productinfo.xml
    + OMV_SCRIPTS_DIR=/usr/share/openmediavault/scripts
    + OMV_DATAMODELS_DIR=/usr/share/openmediavault/datamodels
    + OMV_I18N_LOCALE_DIR=/usr/share/openmediavault/locale
    + OMV_MOUNT_DIR=/srv
    + OMV_NFSD_EXPORT_DIR=/export
    + OMV_CACHE_DIR=/var/cache/openmediavault
    + OMV_LOG_DIR=/var/log/openmediavault
    + OMV_SSL_CERTIFICATE_DIR=/etc/ssl
    + OMV_SSL_CERTIFICATE_PREFIX=openmediavault-
    + OMV_SSH_KEYS_DIR=/etc/ssh
    + OMV_SSH_KEY_PREFIX=openmediavault-
    + OMV_DPKGARCHIVE_DIR=/var/cache/openmediavault/archives
    + OMV_DOCUMENTROOT_DIR=/var/www/openmediavault
    + OMV_CRONSCRIPTS_DIR=/var/lib/openmediavault/cron.d
    + OMV_CONFIGIMPORT_SCRIPTS_DIR=/usr/share/openmediavault/configimport
    + OMV_MKCONF_SCRIPTS_DIR=/usr/share/openmediavault/mkconf
    + OMV_ENGINED_DIR=/usr/share/openmediavault/engined
    + OMV_ENGINED_SO_ADDRESS=/var/lib/openmediavault/engined.sock
    + OMV_ENGINED_SO_OWNERGROUP_NAME=openmediavault-engined
    + OMV_ENGINED_SO_SNDTIMEO=10
    + OMV_ENGINED_SO_RCVTIMEO=180
    + OMV_ENGINED_DIRTY_MODULES_FILE=/var/lib/openmediavault/dirtymodules.json
    + OMV_INITSYSTEM_SCRIPTS_DIR=/usr/share/openmediavault/initsystem
    + OMV_INITSYSTEM_FILE=/var/lib/openmediavault/initsystem.req
    + OMV_USERMGMT_DEFAULT_GROUP=users
    + OMV_RRDGRAPH_DIR=/var/lib/openmediavault/rrd
    + OMV_RRDGRAPH_ERROR_IMAGE=/usr/share/openmediavault/icons/rrd_graph_error_64.png
    + OMV_WEBGUI_FILE_OWNERGROUP_NAME=openmediavault-webgui
    + OMV_CONFIGOBJECT_NEW_UUID=fa4b1c66-ef79-11e5-87a0-0002b3a176b4
    + OMV_DEBUG_SCRIPT=NO
    + OMV_DEBUG_PHP=NO
    + OMV_DEBUG_EXTJS=NO
    + OMV_XMLSTARLET_GET_SHAREDFOLDER_PATH=-m //system/shares/sharedfolder[uuid=current()/sharedfolderref] -v concat(//system/fstab/mntent[uuid=current()/mntentref]/dir,'/',reldirpath) -b
    + OMV_XMLSTARLET_GET_SHAREDFOLDER_NAME=-m //system/shares/sharedfolder[uuid=current()/sharedfolderref] -v name -b
    + OMV_XMLSTARLET_GET_SHAREDFOLDER_MOUNT_DIR=-m //system/shares/sharedfolder[uuid=current()/sharedfolderref] -v concat(//system/fstab/mntent[uuid=current()/mntentref]/dir,'/',reldirpath) -b
    + read id
    + xmlstarlet unesc
    + xmlstarlet sel -t -m /config/system/notification/notifications/*[not(name(.)='notification')] -v name(.) -n /etc/openmediavault/config.xml
    + omv_config_get /config/system/notification/notifications/monitprocevents
    + local _queryresult _rc
    + omv_debug omv_config_get: xpath=</config/system/notification/notifications/monitprocevents>
    + xmlstarlet unesc
    + xmlstarlet sel -t -v /config/system/notification/notifications/monitprocevents /etc/openmediavault/config.xml
    + _queryresult=1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    + _rc=0
    + echo -n 1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    + omv_debug omv_config_get: results: query=<1
    1
    1
    1
    1
    1
    1
    1
    1
    1> cmd=<0>
    + return 0
    + enable=1
    1
    1
    1
    1
    1
    1
    1
    1
    1
    + omv_uuid
    + uuid -v 4
    + object=<uuid>9818f12d-49d4-4b97-beb8-a7c597daeb5e</uuid>
    + object=<uuid>9818f12d-49d4-4b97-beb8-a7c597daeb5e</uuid><id>monitprocevents</id>
    + object=<uuid>9818f12d-49d4-4b97-beb8-a7c597daeb5e</uuid><id>monitprocevents</id><enable>1
    1
    1
    1
    1
    1
    1
    1
    1
    1</enable>
    + omv_config_add_node_data /config/system/notification/notifications notification <uuid>9818f12d-49d4-4b97-beb8-a7c597daeb5e</uuid><id>monitprocevents</id><enable>1
    1
    1
    1
    1
    1
    1
    1
    1
    1</enable>
    + local xpath name data tmpdata tmpfile
    + xpath=/config/system/notification/notifications
    + name=notification
    + data=<uuid>9818f12d-49d4-4b97-beb8-a7c597daeb5e</uuid><id>monitprocevents</id><enable>1
    1
    1
    1
    1
    1
    1
    1
    1
    1</enable>
    + tempfile
    + tmpfile=/tmp/filekhzNmg
    + mktemp --dry-run XXXXXXXXXXXX
    + tmpdata=HWTkCdQoB8N7
    + tee /tmp/filekhzNmg
    + xmlstarlet edit -P -s /config/system/notification/notifications -t elem -n notification -v HWTkCdQoB8N7 /etc/openmediavault/config.xml
    + omv_quotemeta <uuid>9818f12d-49d4-4b97-beb8-a7c597daeb5e</uuid><id>monitprocevents</id><enable>1
    1
    1
    1
    1
    1
    1
    1
    1
    1</enable>
    + sed -e s/\\/\\\\/g -e s/\//\\\//g -e s/&/\\\&/g
    + echo -n <uuid>9818f12d-49d4-4b97-beb8-a7c597daeb5e</uuid><id>monitprocevents</id><enable>1
    1
    1
    1
    1
    1
    1
    1
    1
    1</enable>
    + sed -i s/HWTkCdQoB8N7/<uuid>9818f12d-49d4-4b97-beb8-a7c597daeb5e<\/uuid><id>monitprocevents<\/id><enable>1
    1
    1
    1
    1
    1
    1
    1
    1
    1<\/enable>/ /tmp/filekhzNmg
    sed: -e expression #1, char 99: unterminated `s' command
    txt file icon omv-upgrade-3.0.15.txt (4,407 bytes) 2017-06-13 16:56 +

-Relationships
+Relationships

-Notes

~0004595

T-Dawg2 (reporter)

Quick update, seems to be coming from running command:
/usr/share/openmediavault/confdb/migrations.d/conf_3.0.15.sh

Feb 26 18:30:12 sirius /omv-confdbadm: Failed to apply migrations: Command '['/usr/share/openmediavault/confdb/migrations.d/conf_3.0.15.sh']' returned non-zero exit status 1
Feb 26 18:30:27 sirius /omv-confdbadm: Failed to apply migrations: Command '['/usr/share/openmediavault/confdb/migrations.d/conf_3.0.15.sh']' returned non-zero exit status 1

Still happening on latest version (3.0.64)

~0004597

votdev (administrator)

Please open /usr/share/openmediavault/confdb/migrations.d/conf_3.0.15.sh, add

set -x

below 'set -e' and execute the script. Please post this output here.

~0004802

kenua (reporter)

I'm encountering the same issue and adding the set -x doesn't solve it.
Output is in attachment
Commenting this specific line
omv_config_add_node_data "/config/system/notification/notifications" "notification" "${object}"
allows to complete the migration but I guess something would be missing later

~0004803

kenua (reporter)

btw I was upgrading from latest 2.x version

~0004834

votdev (administrator)

@kenua I checked your protocol again and found out that your config.xml is malformed. There are multiple notificatons except only one, e.g.

<notification>
        <notifications>
                <!--
                <xxx>0|1</xxx>
                -->
                <monitprocevents>1</monitprocevents>
                <monitprocevents>1</monitprocevents>
                <monitprocevents>1</monitprocevents>
                <monitloadavg>1</monitloadavg>
                <monitmemoryusage>1</monitmemoryusage>
                <monitcpuusage>1</monitcpuusage>
                <monitfilesystems>1</monitfilesystems>
                <mdadm>1</mdadm>
                <smartmontools>1</smartmontools>
                <cronapt>1</cronapt>
        </notifications>
</notification>

In your case there were 10 entries for monitprocevents.
+Notes

-Issue History
Date Modified Username Field Change
2017-02-12 11:59 T-Dawg2 New Issue
2017-02-12 11:59 T-Dawg2 Status new => assigned
2017-02-12 11:59 T-Dawg2 Assigned To => votdev
2017-02-12 11:59 T-Dawg2 Tag Attached: erasmus
2017-02-26 19:30 T-Dawg2 Note Added: 0004595
2017-02-27 08:57 votdev Note Added: 0004597
2017-06-13 16:56 kenua File Added: omv-upgrade-3.0.15.txt
2017-06-13 16:56 kenua Note Added: 0004802
2017-06-13 16:56 kenua Note Added: 0004803
2017-07-05 16:35 votdev Status assigned => resolved
2017-07-05 16:35 votdev Resolution open => fixed
2017-07-05 16:35 votdev Fixed in Version => Erasmus (3.x)
2017-07-06 10:38 votdev Note Added: 0004834
2017-07-06 10:44 votdev Resolution fixed => not fixable
+Issue History