Description of problem: Using repo-sync on the console I get the following error message: [root@euedcapp0028 ~]# spacewalk-repo-sync -c centos_6_x86_64_base -f --sync-kickstart Repo URL: ftp://ftp.ciril.fr/pub/linux/centos/6.4/os/x86_64 Packages in repo: 6381 No new packages to sync. Repo ftp://ftp.ciril.fr/pub/linux/centos/6.4/os/x86_64 has 0 errata. Retrieving .discinfo ERROR: (1745, 'ORA-01745: invalid host/bind variable name\n', "insert into rhnKSTreeFile (kstree_id, relative_filename, checksum_id, file_size, last_modified, created, modified) values (:id, :path, lookup_checksum('sha256', :checksum), :size, epoch_seconds_to_timestamp_tz(:st_time), current_timestamp, current_timestamp)") Sync completed. Total time: 0:04:31 Regarding our Oracle DBA "size" is a reserved word in Oracle 11g PL/SQL (see http://docs.oracle.com/cd/B28359_01/appdev.111/b31231/appb.htm#BABDFFBA) Version-Release number of selected component (if applicable): 2.0 How reproducible: All time. Steps to Reproduce: 1. run spacewalk-repo-sync -c <Channel Label> -f --sync-kickstart 2. 3. Actual results: ERROR: (1745, 'ORA-01745) Expected results: Run w.o. erroor message. Additional info:
Can you please check if applying the following patch fixes the issue? diff --git a/backend/satellite_tools/reposync.py b/backend/satellite_tools/reposync.py index f3e2352..d336a88 100644 --- a/backend/satellite_tools/reposync.py +++ b/backend/satellite_tools/reposync.py @@ -620,7 +620,7 @@ class RepoSync(object): insert_h = rhnSQL.prepare(""" insert into rhnKSTreeFile (kstree_id, relative_filename, checksum_id, file_size, last_modified, created, modified) - values (:id, :path, lookup_checksum('sha256', :checksum), :size, epoch_seconds_to_timestamp_tz(:st_time), current_timestamp, current_timestamp) + values (:id, :path, lookup_checksum('sha256', :checksum), :st_size, epoch_seconds_to_timestamp_tz(:st_time), current_timestamp, current_timestamp) """) dirs = [ '' ] while len(dirs) > 0: @@ -646,7 +646,7 @@ class RepoSync(object): print "Retrieving %s" % d + s plug.get_file(d + s, os.path.join(CFG.MOUNT_POINT, ks_path)) st = os.stat(local_path) - insert_h.execute(id = ks_id, path = d + s, checksum = getFileChecksum('sha256', local_path), size = st.st_size, st_time = st.st_mtime) + insert_h.execute(id = ks_id, path = d + s, checksum = getFileChecksum('sha256', local_path), st_size = st.st_size, st_time = st.st_mtime) rhnSQL.commit()
I've checked that above patch fixes the issue. Thanks. Committed to spacewalk master as commit fe9029fe397336c561f1be28deb5d9a2ad9fe6e7 1064296 - rename variable so it doesn't colide with reserved word
Spacewalk 2.1 has been released. https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21
Hello, That works for me. Thanks Michael