Bug 1258255 - [CI] source tarball is created with all files as executable
[CI] source tarball is created with all files as executable
Status: CLOSED CURRENTRELEASE
Product: oVirt
Classification: Community
Component: ovirt-engine-installer (Show other bugs)
3.6
Unspecified Unspecified
unspecified Severity urgent
: ---
: 3.6.0
Assigned To: David Caro
Pavel Stehlik
integration
: AutomationBlocker
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-30 11:09 EDT by Max Kovgan
Modified: 2015-12-01 20:11 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-01 13:21:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Max Kovgan 2015-08-30 11:09:02 EDT
Description of problem:
when running upgrade jobs in upstream jenkins, they're failing due to errors that indicate attempt to execute .sql files "as is"

Version-Release number of selected component (if applicable):
[mkovgan@el6-vm06 ~]$ rpm -qa  | grep ovirt
ovirt-engine-extension-aaa-jdbc-1.0.0-0.0.master.20150820162523.gitabe281a.el6.noarch
ovirt-engine-setup-base-3.6.0-0.0.master.20150829163931.git09a0c9b.el6.noarch
ovirt-engine-wildfly-8.2.0-1.el6.x86_64
ovirt-engine-vmconsole-proxy-helper-3.6.0-0.0.master.20150829163931.git09a0c9b.el6.noarch
ovirt-engine-backend-3.6.0-0.0.master.20150829163931.git09a0c9b.el6.noarch
ebay-cors-filter-1.0.1-0.1.ovirt.el6.noarch
ovirt-engine-lib-3.6.0-0.0.master.20150829163931.git09a0c9b.el6.noarch
ovirt-host-deploy-1.4.0-0.0.master.20150806005700.git670e9c8.el6.noarch
ovirt-host-deploy-java-1.4.0-0.0.master.20150806005700.git670e9c8.el6.noarch
ovirt-engine-extensions-api-impl-3.6.0-0.0.master.20150829163931.git09a0c9b.el6.noarch
ovirt-image-uploader-3.6.0-0.0.master.20150811080921.git6846716.el6.noarch
ovirt-iso-uploader-3.6.0-0.0.master.20150805112253.gitea4158a.el6.noarch
ovirt-engine-setup-plugin-ovirt-engine-common-3.6.0-0.0.master.20150829163931.git09a0c9b.el6.noarch
ovirt-engine-websocket-proxy-3.6.0-0.0.master.20150829163931.git09a0c9b.el6.noarch
ovirt-engine-setup-plugin-vmconsole-proxy-helper-3.6.0-0.0.master.20150829163931.git09a0c9b.el6.noarch
ovirt-engine-setup-3.6.0-0.0.master.20150829163931.git09a0c9b.el6.noarch
ovirt-engine-restapi-3.6.0-0.0.master.20150829163931.git09a0c9b.el6.noarch
ovirt-engine-sdk-python-3.6.0.1-0.1.20150821.gitc8ddcd8.el6.noarch
ovirt-engine-cli-3.6.0.1-0.1.20150821.gitac5082d.el6.noarch
ovirt-engine-setup-plugin-websocket-proxy-3.6.0-0.0.master.20150829163931.git09a0c9b.el6.noarch
ovirt-engine-wildfly-overlay-001-2.el6.noarch
ovirt-engine-setup-plugin-ovirt-engine-3.6.0-0.0.master.20150829163931.git09a0c9b.el6.noarch


How reproducible:
Install the above versions or higher, run upgrade routine, behold the fail.

Steps to Reproduce:
1. Install the above versions or higher, run upgrade routine, behold the fail.
2. run engine-setup


Actual results:
in the results of an error appears:
[ ERROR ] Failed to execute stage 'Misc configuration': Command '/usr/share/ovirt-engine/dbscripts/schema.sh' failed to execute

Expected results:
no error there.

Additional info:

[mkovgan@el6-vm06 ~]$ cd /usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/
[mkovgan@el6-vm06 pre_upgrade]$ ls -l
total 108
-rwxr-xr-x. 1 root root 90749 Aug 29 18:41 0000_config.sql
-rwxr-xr-x. 1 root root  1211 Aug 29 18:41 0010_custom.sql
-rwxr-xr-x. 1 root root   657 Aug 29 18:41 0020_add_materialized_views_table.sql
-rwxr-xr-x. 1 root root   463 Aug 29 18:41 0030_materialized_views_extensions.sql
-rwxr-xr-x. 1 root root    71 Aug 29 18:41 0040_extend_installed_by_column.sql
[mkovgan@el6-vm06 pre_upgrade]$ uname  -a
Linux el6-vm06.phx.ovirt.org 2.6.32-504.23.4.el6.x86_64 #1 SMP Tue Jun 9 20:57:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[mkovgan@el6-vm06 pre_upgrade]$ date
Sun Aug 30 14:49:40 UTC 2015

root cause of the problem is a combination of:
1) assumption that .sql files cannot be executable (even though the shouldn't)
2) .sql files being executable


It's unclear what is the cause of bad file permissions.
a) .spec should be investigated 
b) the job that does the installation as well.
Comment 1 Sharon Naftaly 2015-08-30 11:34:16 EDT
When installing ovirt-engine 3.5 files the files are not executable:
-rw-r--r--. 1 root root 94520 Jun  5 06:31 0000_config.sql
-rw-r--r--. 1 root root  1211 Jun  5 06:31 0010_custom.sql
-rw-r--r--. 1 root root   657 Jun  5 06:31 0020_add_materialized_views_table.sql
-rw-r--r--. 1 root root   463 Jun  5 06:31 0030_materialized_views_extensions.sql
-rw-r--r--. 1 root root    71 Jun  5 06:31 0040_extend_installed_by_column.sql
Comment 2 Alon Bar-Lev 2015-08-30 11:35:17 EDT
files in source tree are good.

rpm files are good:

# rpm -qlvp ovirt-engine-dbscripts-3.6.0-0.0.master.20150828163834.git09a0c9b.el6.noarch.rpm | grep 'r-x'
drwxr-xr-x    2 root    root                        0 Aug 28 21:36 /usr/share/ovirt-engine/dbscripts
drwxr-xr-x    2 root    root                        0 Aug 28 21:36 /usr/share/ovirt-engine/dbscripts/data
-rwxr-xr-x    1 root    root                      540 Aug 28 21:36 /usr/share/ovirt-engine/dbscripts/schema-dev.sh
-rwxr-xr-x    1 root    root                     1577 Aug 28 21:36 /usr/share/ovirt-engine/dbscripts/schema.sh
drwxr-xr-x    2 root    root                        0 Aug 28 21:36 /usr/share/ovirt-engine/dbscripts/upgrade
drwxr-xr-x    2 root    root                        0 Aug 28 21:36 /usr/share/ovirt-engine/dbscripts/upgrade/post_upgrade
drwxr-xr-x    2 root    root                        0 Aug 28 21:36 /usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade

# rpm -qlvp ovirt-engine-dbscripts-3.6.0-0.0.master.20150828163834.git09a0c9b.el6.noarch.rpm | grep 0000_config.sql
-rw-r--r--    1 root    root                    90749 Aug 28 21:36 /usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/0000_config.sql

please run and provide output of:

# rpm -qf /usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/0000_config.sql
# rpm -qlvp @RPM@ | grep 0000_config.sql

I can only guess this is the package above as it is the same git hash, and will be good as well, suggesting that something changed the file mode post rpm install.
Comment 3 Sharon Naftaly 2015-08-30 13:03:23 EDT
the rpm -qf command returned:
- for 3.5:
ovirt-engine-dbscripts-3.5.5-0.0.master.20150829172153.gitb48f019.el6.noarch
- for 3.6:
ovirt-engine-dbscripts-3.6.0-0.0.master.20150829163931.git09a0c9b.el6.noarch

I downloaded the files and ran "rpm -qlvp" on both, and it showed that all the 3.6 files have -rwxr-xr-x permissions, and 3.5 have -rw-r--r--.
Comment 5 Alon Bar-Lev 2015-08-30 13:14:07 EDT
good:

http://resources.ovirt.org/pub/ovirt-3.6-snapshot/rpm/el6/SRPMS/ovirt-engine-3.6.0-0.0.master.20150828163834.git09a0c9b.el6.src.rpm

bad:

http://resources.ovirt.org/pub/ovirt-3.6-snapshot/rpm/el6/SRPMS/ovirt-engine-3.6.0-0.0.master.20150829163931.git09a0c9b.el6.src.rpm

source tarball has executable bit for all files.

checkout was invalid.

please investigate what have you modified in CI between these dates.
Comment 6 David Caro 2015-09-01 13:21:44 EDT
Fixed for any new builds (from this morning)

Note You need to log in before you can comment on or make changes to this bug.