I am trying to setup spacewalk-2.0.1-3 on SL6 and followed the instructions in the wiki provided.
I can install and initially configure spacewalk, but repository syncing always fails. Please note all my install attempts use an external database, disconnected mode is set. I have removed disconnected from the spacewalk server once it is up. For example; Doing the following results in a failure # /usr/bin/python -u /usr/bin/spacewalk-repo-sync --url="http://desktop-6.admin.coxbs.i0/mirror/sl/6.4/x86_64/os" --channel localrepo --type yum --fail Points to note: Channel localrepo is setup with the sl6 6.4 base repository being used as a repo. Desktop-6 contains access to a yum repository, for which yum can access and work properly with. Desktop-6 proxies requests to another host. I have tried other repositories but all via desktop-6 (it is my only accessible endpoint) and all work adequately via yum. None of which work with the spacewalk-sync-repo. When running the output is as follows; Repo URL: http://desktop-6.admin.coxbs.i0/mirror/sl/6.4/x86_64/os Packages in repo: 6449 Packages already synced: 0 Packages to sync: 6449 1/6449 : ConsoleKit-0.4.1-3.el6-0.x86_64 null value in column "name_id" violates not-null constraint CONTEXT: Error occurred on dblink connection named "at_conn": could not execute command. SQL statement "SELECT dblink_exec('at_conn', $1 , true)" PL/pgSQL function "pg_dblink_exec" line 7 at PERFORM SQL statement "SELECT pg_dblink_exec( 'insert into rhnPackageNEVRA(id, name_id, evr_id, package_arch_id) values (' || $1 || ', ' || coalesce(quote_literal( $2 ), 'NULL') || ', ' || coalesce(quote_literal( $3 ), 'NULL') || ', ' || coalesce(quote_literal( $4 ), 'NULL') || ')')" PL/pgSQL function "lookup_package_nevra" line 19 at PERFORM ERROR: null value in column "name_id" violates not-null constraint CONTEXT: Error occurred on dblink connection named "at_conn": could not execute command. SQL statement "SELECT dblink_exec('at_conn', $1 , true)" PL/pgSQL function "pg_dblink_exec" line 7 at PERFORM SQL statement "SELECT pg_dblink_exec( 'insert into rhnPackageNEVRA(id, name_id, evr_id, package_arch_id) values (' || $1 || ', ' || coalesce(quote_literal( $2 ), 'NULL') || ', ' || coalesce(quote_literal( $3 ), 'NULL') || ', ' || coalesce(quote_literal( $4 ), 'NULL') || ')')" PL/pgSQL function "lookup_package_nevra" line 19 at PERFORM Traceback (most recent call last): File "/usr/bin/spacewalk-repo-sync", line 106, in <module> sys.exit(abs(main() or 0)) File "/usr/bin/spacewalk-repo-sync", line 99, in main sync.sync() File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/reposync.py", line 134, in sync [self.channel_label], [], "server.app.yumreposync") File "/usr/lib/python2.6/site-packages/spacewalk/server/taskomatic.py", line 65, in add_to_repodata_queue_for_channel_package_subscription add_to_repodata_queue(channel, caller, reason[:128]) File "/usr/lib/python2.6/site-packages/spacewalk/server/taskomatic.py", line 51, in add_to_repodata_queue queue.add(entry) File "/usr/lib/python2.6/site-packages/spacewalk/server/taskomatic.py", line 43, in add bypass_filters=self._boolean_as_char(entry.bypass_filters)) File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/sql_base.py", line 163, in execute return apply(self._execute_wrapper, (self._execute, ) + p, kw) File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 279, in _execute_wrapper raise sql_base.SQLSchemaError(error_code, e.pgerror, e) spacewalk.server.rhnSQL.sql_base.SQLSchemaError: (99999, 'ERROR: current transaction is aborted, commands ignored until end of transaction block', '', InternalError('current transaction is aborted, commands ignored until end of transaction block\n',)) The furthest I have tracked this down to in python indicates that the 'name_id' is filled in by the class 'GenericPackageImport' in importlib/importLib.py, the method '_postprocessPackageNEVRA' is called. It relies on a value 'self.names[package.name]', which is always "None" (python nonetype). I assume that this value is meant to be filled in somewhere or somehow, presumably through the use of another database table. It doesn't exist at the moment since it is the first time I am syncing the repository. Looking through that region of code did not indicate to me any place where 'self.names' in that class is being modified to anything but to serve up 'None' values. I have tried reinstalling from scratch but get the same problem again. I am certain I must be doing something wrong procedurally somewhere, going through the mailing list for the last 3 months provides no indication anybody else has experienced a similar issue. Any help at this stage is greatly appreciated. _______________________________________________ Spacewalk-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/spacewalk-list
