Hi
When trying to access the build and package pages I get:
ProgrammingError: (psycopg2.ProgrammingError) function status_to_order(integer) does not exist LINE 8: ...LECT build_chroot.build_id, started_on, ended_on, status_to_... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. [SQL: '\nSELECT build.id, MAX(package.name) AS pkg_name, build.pkg_version, build.submitted_on,\n MIN(statuses.started_on) AS started_on, MAX(statuses.ended_on) AS ended_on, order_to_status(MIN(statuses.st)) AS status,\n build.canceled, MIN("group".name) AS group_name, MIN(copr.name) as copr_name, MIN("user".username) as user_name\nFROM build\nLEFT OUTER JOIN package\n ON build.package_id = package.id\nLEFT OUTER JOIN (SELECT build_chroot.build_id, started_on, ended_on, status_to_order(status) AS st FROM build_chroot) AS statuses\n ON statuses.build_id=build.id\nLEFT OUTER JOIN copr\n ON copr.id = build.copr_id\nLEFT OUTER JOIN "user"\n ON copr.user_id = "user".id\nLEFT OUTER JOIN "group"\n ON copr.group_id = "group".id\nWHERE build.copr_id = %(copr_id)s\nGROUP BY\n build.id;\n'] [parameters: {'copr_id': 1}]
Seems like the function "status_to_order" is missing.. I have tried upgrading to python-psycopg2-2.6.1-1.. no change...
Any suggestions???
/Martin
On Wed, Nov 16, 2016 at 3:38 PM, Martin Juhl mj@casalogic.dk wrote:
Hi
When trying to access the build and package pages I get:
ProgrammingError: (psycopg2.ProgrammingError) function status_to_order(integer) does not exist LINE 8: ...LECT build_chroot.build_id, started_on, ended_on, status_to_... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. [SQL: '\nSELECT build.id, MAX(package.name) AS pkg_name, build.pkg_version, build.submitted_on,\n MIN(statuses.started_on) AS started_on, MAX(statuses.ended_on) AS ended_on, order_to_status(MIN( statuses.st)) AS status,\n build.canceled, MIN("group".name) AS group_name, MIN(copr.name) as copr_name, MIN("user".username) as user_name\nFROM build\nLEFT OUTER JOIN package\n ON build.package_id = package.id\nLEFT OUTER JOIN (SELECT build_chroot.build_id, started_on, ended_on, status_to_order(status) AS st FROM build_chroot) AS statuses\n ON statuses.build_id=build.id\nLEFT OUTER JOIN copr\n ON copr.id = build.copr_id\nLEFT OUTER JOIN "user"\n ON copr.user_id = "user".id\nLEFT OUTER JOIN "group"\n ON copr.group_id = "group".id\nWHERE build.copr_id = %(copr_id)s\nGROUP BY\n build.id;\n'] [parameters: {'copr_id': 1}]
Seems like the function "status_to_order" is missing.. I have tried upgrading to python-psycopg2-2.6.1-1.. no change...
Any suggestions???
You need to run:
~/copr/frontend/coprs_frontend $ COPR_CONFIG=/etc/copr/copr.conf alembic downgrade 3ec22e1db75a ~/copr/frontend/coprs_frontend $ COPR_CONFIG=/etc/copr/copr.conf alembic upgrade head
"./manage.py create_db --alembic alembic.ini" installation instruction from copr-setup.txt is creating db according to COPR flask models but this db function is defined purely in alembic revisions. In the next release, this will be fixed.
/Martin
copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
"Next" meaning one after the upcoming release :).
On Wed, Nov 16, 2016 at 4:06 PM, Michal Novotny clime@redhat.com wrote:
On Wed, Nov 16, 2016 at 3:38 PM, Martin Juhl mj@casalogic.dk wrote:
Hi
When trying to access the build and package pages I get:
ProgrammingError: (psycopg2.ProgrammingError) function status_to_order(integer) does not exist LINE 8: ...LECT build_chroot.build_id, started_on, ended_on, status_to_... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. [SQL: '\nSELECT build.id, MAX(package.name) AS pkg_name, build.pkg_version, build.submitted_on,\n MIN(statuses.started_on) AS started_on, MAX(statuses.ended_on) AS ended_on, order_to_status(MIN( statuses.st)) AS status,\n build.canceled, MIN("group".name) AS group_name, MIN(copr.name) as copr_name, MIN("user".username) as user_name\nFROM build\nLEFT OUTER JOIN package\n ON build.package_id = package.id\nLEFT OUTER JOIN (SELECT build_chroot.build_id, started_on, ended_on, status_to_order(status) AS st FROM build_chroot) AS statuses\n ON statuses.build_id=build.id\nLEFT OUTER JOIN copr\n ON copr.id = build.copr_id\nLEFT OUTER JOIN "user"\n ON copr.user_id = "user".id\nLEFT OUTER JOIN "group"\n ON copr.group_id = "group".id\nWHERE build.copr_id = %(copr_id)s\nGROUP BY\n build.id;\n'] [parameters: {'copr_id': 1}]
Seems like the function "status_to_order" is missing.. I have tried upgrading to python-psycopg2-2.6.1-1.. no change...
Any suggestions???
You need to run:
~/copr/frontend/coprs_frontend $ COPR_CONFIG=/etc/copr/copr.conf alembic downgrade 3ec22e1db75a ~/copr/frontend/coprs_frontend $ COPR_CONFIG=/etc/copr/copr.conf alembic upgrade head
"./manage.py create_db --alembic alembic.ini" installation instruction from copr-setup.txt is creating db according to COPR flask models but this db function is defined purely in alembic revisions. In the next release, this will be fixed.
/Martin
copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
Hi Michal
I still have the same issue...
[root@copr coprs_frontend]# COPR_CONFIG=/etc/copr/copr.conf alembic downgrade 3ec22e1db75a -------------------------------------------------------------------------------- INFO in log [/usr/share/copr/coprs_frontend/coprs/log.py:48]: logging configuration finished, config: <Config {'JSON_AS_ASCII': True, 'INTRANET_IPS': ['127.0.0.1', '192.168.20.0/24'], 'KRB5_LOGIN': {}, 'LOG_FILENAME': '/var/log/copr/frontend.log', 'DIST_GIT_URL': 'http://copr.casalogic.lan/cgit/', 'SQLALCHEMY_POOL_RECYCLE': None, 'OPENID_STORE': '/usr/share/copr/coprs_frontend/coprs/../../data/openid_store', 'BACKEND_BASE_URL': 'http://copr-be-dev.cloud.fedoraproject.org', 'SQLALCHEMY_ECHO': False, 'SQLALCHEMY_TRACK_MODIFICATIONS': True, 'SEND_LOGS_TO': ['root@localhost'], 'SQLALCHEMY_POOL_TIMEOUT': None, 'SQLALCHEMY_RECORD_QUERIES': None, 'SESSION_COOKIE_DOMAIN': None, 'SESSION_COOKIE_NAME': 'session', 'SRPM_STORAGE_DIR': '/var/lib/copr/data/srpm_storage', 'KRB5_LOGIN_BASEURI': '/krb5_login/', 'WHOOSHEE_DIR': '/usr/share/copr/coprs_frontend/coprs/../../data/whooshee', 'REDIS_PORT': 6379, 'SQLALCHEMY_NATIVE_UNICODE': None, 'MAX_CONTENT_LENGTH': None, 'API_TOKEN_LENGTH': 30, 'DATABASE': '/usr/share/copr/coprs_frontend/coprs/../../data/copr.db', 'SEND_EMAILS': True, 'PERMANENT_SESSION_LIFETIME': datetime.timedelta(31), 'SQLALCHEMY_POOL_SIZE': None, 'SQLALCHEMY_MAX_OVERFLOW': None, 'SEND_LEGAL_TO': ['root@localhost'], 'TRAP_HTTP_EXCEPTIONS': False, 'PRESERVE_CONTEXT_ON_EXCEPTION': None, 'BUILDER_IPS': ['127.0.0.1'], 'DATA_DIR': '/usr/share/copr/coprs_frontend/coprs/../../data', 'API_TOKEN_EXPIRATION': 180, 'BACKEND_PASSWORD': 'mjp123', 'SESSION_COOKIE_PATH': None, 'FEDMENU_DATA_URL': 'http://threebean.org/fedmenu/dev-data.js', 'LOGGER_NAME': 'coprs', 'SECRET_KEY': 'THISISNOTASECRETATALL', 'OPENID_FS_STORE_PATH': None, 'ENFORCE_PROTOCOL_FOR_BACKEND_URL': 'http', 'USE_ALLOWED_USERS': False, 'APPLICATION_ROOT': None, 'SERVER_NAME': None, 'PREFERRED_URL_SCHEME': 'http', 'TESTING': False, 'FEDMENU_URL': 'http://threebean.org/fedmenu/', 'ENFORCE_PROTOCOL_FOR_FRONTEND_URL': 'http', 'ALLOWED_USERS': [], 'BLACKLISTED_GROUPS': ['fedorabugs', 'packager', 'provenpackager'], 'LOGGING_LEVEL': 10, 'USE_X_SENDFILE': False, 'SQLALCHEMY_DATABASE_URI': 'postgresql+psycopg2://copr-fe:coprpass@/coprdb', 'SESSION_COOKIE_SECURE': False, 'REDIS_HOST': '127.0.0.1', 'DEBUG': True, 'SQLALCHEMY_COMMIT_ON_TEARDOWN': False, 'SQLALCHEMY_BINDS': None, 'REPO_GPGCHECK': 1, 'JSONIFY_PRETTYPRINT_REGULAR': True, 'PROPAGATE_EXCEPTIONS': None, 'TRAP_BAD_REQUEST_ERRORS': False, 'JSON_SORT_KEYS': True, 'SESSION_COOKIE_HTTPONLY': True, 'SEND_FILE_MAX_AGE_DEFAULT': 43200, 'PUBLIC_COPR_HOSTNAME': 'copr.casalogic.lan'}> -------------------------------------------------------------------------------- INFO [coprs] logging configuration finished, config: <Config {'JSON_AS_ASCII': True, 'INTRANET_IPS': ['127.0.0.1', '192.168.20.0/24'], 'KRB5_LOGIN': {}, 'LOG_FILENAME': '/var/log/copr/frontend.log', 'DIST_GIT_URL': 'http://copr.casalogic.lan/cgit/', 'SQLALCHEMY_POOL_RECYCLE': None, 'OPENID_STORE': '/usr/share/copr/coprs_frontend/coprs/../../data/openid_store', 'BACKEND_BASE_URL': 'http://copr-be-dev.cloud.fedoraproject.org', 'SQLALCHEMY_ECHO': False, 'SQLALCHEMY_TRACK_MODIFICATIONS': True, 'SEND_LOGS_TO': ['root@localhost'], 'SQLALCHEMY_POOL_TIMEOUT': None, 'SQLALCHEMY_RECORD_QUERIES': None, 'SESSION_COOKIE_DOMAIN': None, 'SESSION_COOKIE_NAME': 'session', 'SRPM_STORAGE_DIR': '/var/lib/copr/data/srpm_storage', 'KRB5_LOGIN_BASEURI': '/krb5_login/', 'WHOOSHEE_DIR': '/usr/share/copr/coprs_frontend/coprs/../../data/whooshee', 'REDIS_PORT': 6379, 'SQLALCHEMY_NATIVE_UNICODE': None, 'MAX_CONTENT_LENGTH': None, 'API_TOKEN_LENGTH': 30, 'DATABASE': '/usr/share/copr/coprs_frontend/coprs/../../data/copr.db', 'SEND_EMAILS': True, 'PERMANENT_SESSION_LIFETIME': datetime.timedelta(31), 'SQLALCHEMY_POOL_SIZE': None, 'SQLALCHEMY_MAX_OVERFLOW': None, 'SEND_LEGAL_TO': ['root@localhost'], 'TRAP_HTTP_EXCEPTIONS': False, 'PRESERVE_CONTEXT_ON_EXCEPTION': None, 'BUILDER_IPS': ['127.0.0.1'], 'DATA_DIR': '/usr/share/copr/coprs_frontend/coprs/../../data', 'API_TOKEN_EXPIRATION': 180, 'BACKEND_PASSWORD': 'mjp123', 'SESSION_COOKIE_PATH': None, 'FEDMENU_DATA_URL': 'http://threebean.org/fedmenu/dev-data.js', 'LOGGER_NAME': 'coprs', 'SECRET_KEY': 'THISISNOTASECRETATALL', 'OPENID_FS_STORE_PATH': None, 'ENFORCE_PROTOCOL_FOR_BACKEND_URL': 'http', 'USE_ALLOWED_USERS': False, 'APPLICATION_ROOT': None, 'SERVER_NAME': None, 'PREFERRED_URL_SCHEME': 'http', 'TESTING': False, 'FEDMENU_URL': 'http://threebean.org/fedmenu/', 'ENFORCE_PROTOCOL_FOR_FRONTEND_URL': 'http', 'ALLOWED_USERS': [], 'BLACKLISTED_GROUPS': ['fedorabugs', 'packager', 'provenpackager'], 'LOGGING_LEVEL': 10, 'USE_X_SENDFILE': False, 'SQLALCHEMY_DATABASE_URI': 'postgresql+psycopg2://copr-fe:coprpass@/coprdb', 'SESSION_COOKIE_SECURE': False, 'REDIS_HOST': '127.0.0.1', 'DEBUG': True, 'SQLALCHEMY_COMMIT_ON_TEARDOWN': False, 'SQLALCHEMY_BINDS': None, 'REPO_GPGCHECK': 1, 'JSONIFY_PRETTYPRINT_REGULAR': True, 'PROPAGATE_EXCEPTIONS': None, 'TRAP_BAD_REQUEST_ERRORS': False, 'JSON_SORT_KEYS': True, 'SESSION_COOKIE_HTTPONLY': True, 'SEND_FILE_MAX_AGE_DEFAULT': 43200, 'PUBLIC_COPR_HOSTNAME': 'copr.casalogic.lan'}> INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. INFO [alembic.runtime.migration] Running downgrade 573044986ee9 -> 4b57794e2b5, empty message INFO [alembic.runtime.migration] Running downgrade 4b57794e2b5 -> 19ca0c14096e, fix stored procudure (status order) bug INFO [alembic.runtime.migration] Running downgrade 19ca0c14096e -> 3ec22e1db75a, status_to_order function [root@copr coprs_frontend]# COPR_CONFIG=/etc/copr/copr.conf alembic upgrade head -------------------------------------------------------------------------------- INFO in log [/usr/share/copr/coprs_frontend/coprs/log.py:48]: logging configuration finished, config: <Config {'JSON_AS_ASCII': True, 'INTRANET_IPS': ['127.0.0.1', '192.168.20.0/24'], 'KRB5_LOGIN': {}, 'LOG_FILENAME': '/var/log/copr/frontend.log', 'DIST_GIT_URL': 'http://copr.casalogic.lan/cgit/', 'SQLALCHEMY_POOL_RECYCLE': None, 'OPENID_STORE': '/usr/share/copr/coprs_frontend/coprs/../../data/openid_store', 'BACKEND_BASE_URL': 'http://copr-be-dev.cloud.fedoraproject.org', 'SQLALCHEMY_ECHO': False, 'SQLALCHEMY_TRACK_MODIFICATIONS': True, 'SEND_LOGS_TO': ['root@localhost'], 'SQLALCHEMY_POOL_TIMEOUT': None, 'SQLALCHEMY_RECORD_QUERIES': None, 'SESSION_COOKIE_DOMAIN': None, 'SESSION_COOKIE_NAME': 'session', 'SRPM_STORAGE_DIR': '/var/lib/copr/data/srpm_storage', 'KRB5_LOGIN_BASEURI': '/krb5_login/', 'WHOOSHEE_DIR': '/usr/share/copr/coprs_frontend/coprs/../../data/whooshee', 'REDIS_PORT': 6379, 'SQLALCHEMY_NATIVE_UNICODE': None, 'MAX_CONTENT_LENGTH': None, 'API_TOKEN_LENGTH': 30, 'DATABASE': '/usr/share/copr/coprs_frontend/coprs/../../data/copr.db', 'SEND_EMAILS': True, 'PERMANENT_SESSION_LIFETIME': datetime.timedelta(31), 'SQLALCHEMY_POOL_SIZE': None, 'SQLALCHEMY_MAX_OVERFLOW': None, 'SEND_LEGAL_TO': ['root@localhost'], 'TRAP_HTTP_EXCEPTIONS': False, 'PRESERVE_CONTEXT_ON_EXCEPTION': None, 'BUILDER_IPS': ['127.0.0.1'], 'DATA_DIR': '/usr/share/copr/coprs_frontend/coprs/../../data', 'API_TOKEN_EXPIRATION': 180, 'BACKEND_PASSWORD': 'mjp123', 'SESSION_COOKIE_PATH': None, 'FEDMENU_DATA_URL': 'http://threebean.org/fedmenu/dev-data.js', 'LOGGER_NAME': 'coprs', 'SECRET_KEY': 'THISISNOTASECRETATALL', 'OPENID_FS_STORE_PATH': None, 'ENFORCE_PROTOCOL_FOR_BACKEND_URL': 'http', 'USE_ALLOWED_USERS': False, 'APPLICATION_ROOT': None, 'SERVER_NAME': None, 'PREFERRED_URL_SCHEME': 'http', 'TESTING': False, 'FEDMENU_URL': 'http://threebean.org/fedmenu/', 'ENFORCE_PROTOCOL_FOR_FRONTEND_URL': 'http', 'ALLOWED_USERS': [], 'BLACKLISTED_GROUPS': ['fedorabugs', 'packager', 'provenpackager'], 'LOGGING_LEVEL': 10, 'USE_X_SENDFILE': False, 'SQLALCHEMY_DATABASE_URI': 'postgresql+psycopg2://copr-fe:coprpass@/coprdb', 'SESSION_COOKIE_SECURE': False, 'REDIS_HOST': '127.0.0.1', 'DEBUG': True, 'SQLALCHEMY_COMMIT_ON_TEARDOWN': False, 'SQLALCHEMY_BINDS': None, 'REPO_GPGCHECK': 1, 'JSONIFY_PRETTYPRINT_REGULAR': True, 'PROPAGATE_EXCEPTIONS': None, 'TRAP_BAD_REQUEST_ERRORS': False, 'JSON_SORT_KEYS': True, 'SESSION_COOKIE_HTTPONLY': True, 'SEND_FILE_MAX_AGE_DEFAULT': 43200, 'PUBLIC_COPR_HOSTNAME': 'copr.casalogic.lan'}> -------------------------------------------------------------------------------- INFO [coprs] logging configuration finished, config: <Config {'JSON_AS_ASCII': True, 'INTRANET_IPS': ['127.0.0.1', '192.168.20.0/24'], 'KRB5_LOGIN': {}, 'LOG_FILENAME': '/var/log/copr/frontend.log', 'DIST_GIT_URL': 'http://copr.casalogic.lan/cgit/', 'SQLALCHEMY_POOL_RECYCLE': None, 'OPENID_STORE': '/usr/share/copr/coprs_frontend/coprs/../../data/openid_store', 'BACKEND_BASE_URL': 'http://copr-be-dev.cloud.fedoraproject.org', 'SQLALCHEMY_ECHO': False, 'SQLALCHEMY_TRACK_MODIFICATIONS': True, 'SEND_LOGS_TO': ['root@localhost'], 'SQLALCHEMY_POOL_TIMEOUT': None, 'SQLALCHEMY_RECORD_QUERIES': None, 'SESSION_COOKIE_DOMAIN': None, 'SESSION_COOKIE_NAME': 'session', 'SRPM_STORAGE_DIR': '/var/lib/copr/data/srpm_storage', 'KRB5_LOGIN_BASEURI': '/krb5_login/', 'WHOOSHEE_DIR': '/usr/share/copr/coprs_frontend/coprs/../../data/whooshee', 'REDIS_PORT': 6379, 'SQLALCHEMY_NATIVE_UNICODE': None, 'MAX_CONTENT_LENGTH': None, 'API_TOKEN_LENGTH': 30, 'DATABASE': '/usr/share/copr/coprs_frontend/coprs/../../data/copr.db', 'SEND_EMAILS': True, 'PERMANENT_SESSION_LIFETIME': datetime.timedelta(31), 'SQLALCHEMY_POOL_SIZE': None, 'SQLALCHEMY_MAX_OVERFLOW': None, 'SEND_LEGAL_TO': ['root@localhost'], 'TRAP_HTTP_EXCEPTIONS': False, 'PRESERVE_CONTEXT_ON_EXCEPTION': None, 'BUILDER_IPS': ['127.0.0.1'], 'DATA_DIR': '/usr/share/copr/coprs_frontend/coprs/../../data', 'API_TOKEN_EXPIRATION': 180, 'BACKEND_PASSWORD': 'mjp123', 'SESSION_COOKIE_PATH': None, 'FEDMENU_DATA_URL': 'http://threebean.org/fedmenu/dev-data.js', 'LOGGER_NAME': 'coprs', 'SECRET_KEY': 'THISISNOTASECRETATALL', 'OPENID_FS_STORE_PATH': None, 'ENFORCE_PROTOCOL_FOR_BACKEND_URL': 'http', 'USE_ALLOWED_USERS': False, 'APPLICATION_ROOT': None, 'SERVER_NAME': None, 'PREFERRED_URL_SCHEME': 'http', 'TESTING': False, 'FEDMENU_URL': 'http://threebean.org/fedmenu/', 'ENFORCE_PROTOCOL_FOR_FRONTEND_URL': 'http', 'ALLOWED_USERS': [], 'BLACKLISTED_GROUPS': ['fedorabugs', 'packager', 'provenpackager'], 'LOGGING_LEVEL': 10, 'USE_X_SENDFILE': False, 'SQLALCHEMY_DATABASE_URI': 'postgresql+psycopg2://copr-fe:coprpass@/coprdb', 'SESSION_COOKIE_SECURE': False, 'REDIS_HOST': '127.0.0.1', 'DEBUG': True, 'SQLALCHEMY_COMMIT_ON_TEARDOWN': False, 'SQLALCHEMY_BINDS': None, 'REPO_GPGCHECK': 1, 'JSONIFY_PRETTYPRINT_REGULAR': True, 'PROPAGATE_EXCEPTIONS': None, 'TRAP_BAD_REQUEST_ERRORS': False, 'JSON_SORT_KEYS': True, 'SESSION_COOKIE_HTTPONLY': True, 'SEND_FILE_MAX_AGE_DEFAULT': 43200, 'PUBLIC_COPR_HOSTNAME': 'copr.casalogic.lan'}> INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. INFO [alembic.runtime.migration] Running upgrade 3ec22e1db75a -> 19ca0c14096e, status_to_order function INFO [alembic.runtime.migration] Running upgrade 19ca0c14096e -> 4b57794e2b5, fix stored procudure (status order) bug INFO [alembic.runtime.migration] Running upgrade 4b57794e2b5 -> 573044986ee9, empty message [root@copr coprs_frontend]# ./manage.py create_db --alembic alembic.ini -------------------------------------------------------------------------------- INFO in log [/usr/share/copr/coprs_frontend/coprs/log.py:48]: logging configuration finished, config: <Config {'JSON_AS_ASCII': True, 'INTRANET_IPS': ['127.0.0.1', '192.168.20.0/24'], 'KRB5_LOGIN': {}, 'LOG_FILENAME': '/var/log/copr/frontend.log', 'DIST_GIT_URL': 'http://copr.casalogic.lan/cgit/', 'SQLALCHEMY_POOL_RECYCLE': None, 'OPENID_STORE': '/usr/share/copr/coprs_frontend/coprs/../../data/openid_store', 'BACKEND_BASE_URL': 'http://copr-be-dev.cloud.fedoraproject.org', 'SQLALCHEMY_ECHO': False, 'SQLALCHEMY_TRACK_MODIFICATIONS': True, 'SEND_LOGS_TO': ['root@localhost'], 'SQLALCHEMY_POOL_TIMEOUT': None, 'SQLALCHEMY_RECORD_QUERIES': None, 'SESSION_COOKIE_DOMAIN': None, 'SESSION_COOKIE_NAME': 'session', 'SRPM_STORAGE_DIR': '/var/lib/copr/data/srpm_storage', 'KRB5_LOGIN_BASEURI': '/krb5_login/', 'WHOOSHEE_DIR': '/usr/share/copr/coprs_frontend/coprs/../../data/whooshee', 'REDIS_PORT': 6379, 'SQLALCHEMY_NATIVE_UNICODE': None, 'MAX_CONTENT_LENGTH': None, 'API_TOKEN_LENGTH': 30, 'DATABASE': '/usr/share/copr/coprs_frontend/coprs/../../data/copr.db', 'SEND_EMAILS': True, 'PERMANENT_SESSION_LIFETIME': datetime.timedelta(31), 'SQLALCHEMY_POOL_SIZE': None, 'SQLALCHEMY_MAX_OVERFLOW': None, 'SEND_LEGAL_TO': ['root@localhost'], 'TRAP_HTTP_EXCEPTIONS': False, 'PRESERVE_CONTEXT_ON_EXCEPTION': None, 'BUILDER_IPS': ['127.0.0.1'], 'DATA_DIR': '/usr/share/copr/coprs_frontend/coprs/../../data', 'API_TOKEN_EXPIRATION': 180, 'BACKEND_PASSWORD': 'mjp123', 'SESSION_COOKIE_PATH': None, 'FEDMENU_DATA_URL': 'http://threebean.org/fedmenu/dev-data.js', 'LOGGER_NAME': 'coprs', 'SECRET_KEY': 'THISISNOTASECRETATALL', 'OPENID_FS_STORE_PATH': None, 'ENFORCE_PROTOCOL_FOR_BACKEND_URL': 'http', 'USE_ALLOWED_USERS': False, 'APPLICATION_ROOT': None, 'SERVER_NAME': None, 'PREFERRED_URL_SCHEME': 'http', 'TESTING': False, 'FEDMENU_URL': 'http://threebean.org/fedmenu/', 'ENFORCE_PROTOCOL_FOR_FRONTEND_URL': 'http', 'ALLOWED_USERS': [], 'BLACKLISTED_GROUPS': ['fedorabugs', 'packager', 'provenpackager'], 'LOGGING_LEVEL': 10, 'USE_X_SENDFILE': False, 'SQLALCHEMY_DATABASE_URI': 'postgresql+psycopg2://copr-fe:coprpass@/coprdb', 'SESSION_COOKIE_SECURE': False, 'REDIS_HOST': '127.0.0.1', 'DEBUG': True, 'SQLALCHEMY_COMMIT_ON_TEARDOWN': False, 'SQLALCHEMY_BINDS': None, 'REPO_GPGCHECK': 1, 'JSONIFY_PRETTYPRINT_REGULAR': True, 'PROPAGATE_EXCEPTIONS': None, 'TRAP_BAD_REQUEST_ERRORS': False, 'JSON_SORT_KEYS': True, 'SESSION_COOKIE_HTTPONLY': True, 'SEND_FILE_MAX_AGE_DEFAULT': 43200, 'PUBLIC_COPR_HOSTNAME': 'copr.casalogic.lan'}> -------------------------------------------------------------------------------- INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL.
/Martin
----- Original meddelelse ----- Fra: "Michal Novotny" clime@redhat.com Til: "copr-devel" copr-devel@lists.fedorahosted.org Sendt: onsdag, 16. november 2016 16:08:27 Emne: | Re: missing status_to_order function
"Next" meaning one after the upcoming release :).
On Wed, Nov 16, 2016 at 4:06 PM, Michal Novotny < clime@redhat.com > wrote:
On Wed, Nov 16, 2016 at 3:38 PM, Martin Juhl < mj@casalogic.dk > wrote:
BQ_BEGIN Hi
When trying to access the build and package pages I get:
ProgrammingError: (psycopg2.ProgrammingError) function status_to_order(integer) does not exist LINE 8: ...LECT build_chroot.build_id, started_on, ended_on, status_to_... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. [SQL: '\nSELECT build.id , MAX( package.name ) AS pkg_name, build.pkg_version, build.submitted_on,\n MIN(statuses.started_on) AS started_on, MAX(statuses.ended_on) AS ended_on, order_to_status(MIN( statuses.st )) AS status,\n build.canceled, MIN("group".name) AS group_name, MIN( copr.name ) as copr_name, MIN("user".username) as user_name\nFROM build\nLEFT OUTER JOIN package\n ON build.package_id = package.id \nLEFT OUTER JOIN (SELECT build_chroot.build_id, started_on, ended_on, status_to_order(status) AS st FROM build_chroot) AS statuses\n ON statuses.build_id= build.id \nLEFT OUTER JOIN copr\n ON copr.id = build.copr_id\nLEFT OUTER JOIN "user"\n ON copr.user_id = "user".id\nLEFT OUTER JOIN "group"\n ON copr.group_id = "group".id\nWHERE build.copr_id = %(copr_id)s\nGROUP BY\n build.id ;\n'] [parameters: {'copr_id': 1}]
Seems like the function "status_to_order" is missing.. I have tried upgrading to python-psycopg2-2.6.1-1.. no change...
Any suggestions???
You need to run:
~/copr/frontend/coprs_frontend $ COPR_CONFIG=/etc/copr/copr.conf alembic downgrade 3ec22e1db75a ~/copr/frontend/coprs_frontend $ COPR_CONFIG=/etc/copr/copr.conf alembic upgrade head
"./manage.py create_db --alembic alembic.ini" installation instruction from copr-setup.txt is creating db according to COPR flask models but this db function is defined purely in alembic revisions. In the next release, this will be fixed.
BQ_BEGIN /Martin _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
BQ_END
_______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
BQ_END
_______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
Sorry...
Tested on wrong server...
Getting an error:
[root@copr01 coprs_frontend]# COPR_CONFIG=/etc/copr/copr.conf alembic downgrade 3ec22e1db75a -------------------------------------------------------------------------------- INFO in log [/usr/share/copr/coprs_frontend/coprs/log.py:48]: logging configuration finished, config: <Config {'JSON_AS_ASCII': True, 'INTRANET_IPS': ['127.0.0.1', '192.168.20.0/24'], 'KRB5_LOGIN': {'RH': {'log_text': 'Krb5 login', 'URI': 'casalogic', 'email_domain': 'CASALOGIC.LAN'}}, 'LOG_FILENAME': '/var/log/copr-frontend/frontend.log', 'DIST_GIT_URL': 'http://copr01.casalogic.lan/cgit', 'SQLALCHEMY_POOL_RECYCLE': None, 'OPENID_STORE': '/var/lib/copr/data/openid_store', 'BACKEND_BASE_URL': 'http://copr01.casalogic.lan', 'SQLALCHEMY_ECHO': False, 'SQLALCHEMY_TRACK_MODIFICATIONS': True, 'SEND_LOGS_TO': ['root@localhost'], 'SQLALCHEMY_POOL_TIMEOUT': None, 'SQLALCHEMY_RECORD_QUERIES': None, 'SESSION_COOKIE_DOMAIN': None, 'SESSION_COOKIE_NAME': 'session', 'SRPM_STORAGE_DIR': '/var/lib/copr/data/srpm_storage', 'KRB5_LOGIN_BASEURI': '/krb5_login/', 'WHOOSHEE_DIR': '/var/lib/copr/data/whooshee', 'REDIS_PORT': 6379, 'SQLALCHEMY_NATIVE_UNICODE': None, 'MAX_CONTENT_LENGTH': None, 'API_TOKEN_LENGTH': 30, 'DATABASE': '/var/lib/copr/data/copr.db', 'SEND_EMAILS': True, 'PERMANENT_SESSION_LIFETIME': datetime.timedelta(31), 'SQLALCHEMY_POOL_SIZE': None, 'SQLALCHEMY_MAX_OVERFLOW': None, 'SEND_LEGAL_TO': ['root@localhost'], 'TRAP_HTTP_EXCEPTIONS': False, 'PRESERVE_CONTEXT_ON_EXCEPTION': None, 'BUILDER_IPS': ['127.0.0.1'], 'DATA_DIR': '/var/lib/copr/data', 'API_TOKEN_EXPIRATION': 180, 'BACKEND_PASSWORD': 'mjp123', 'SESSION_COOKIE_PATH': None, 'COPR_DIST_GIT_LOGS_URL': 'http://copr01.casalogic.lan/per-task-logs', 'LOGGER_NAME': 'coprs', 'SECRET_KEY': 'mjp123', 'OPENID_FS_STORE_PATH': None, 'ENFORCE_PROTOCOL_FOR_BACKEND_URL': 'http', 'USE_ALLOWED_USERS': False, 'APPLICATION_ROOT': None, 'SERVER_NAME': None, 'PREFERRED_URL_SCHEME': 'http', 'TESTING': False, 'ENFORCE_PROTOCOL_FOR_FRONTEND_URL': 'http', 'ALLOWED_USERS': [], 'LOG_DIR': '/var/log/copr-frontend/', 'BLACKLISTED_GROUPS': ['fedorabugs', 'packager', 'provenpackager'], 'LOGGING_LEVEL': 10, 'USE_X_SENDFILE': False, 'SQLALCHEMY_DATABASE_URI': 'postgresql+psycopg2://copr-fe:coprpass@localhost/coprdb', 'SESSION_COOKIE_SECURE': False, 'REDIS_HOST': '127.0.0.1', 'DEBUG': True, 'SQLALCHEMY_COMMIT_ON_TEARDOWN': False, 'SQLALCHEMY_BINDS': None, 'REPO_GPGCHECK': 1, 'JSONIFY_PRETTYPRINT_REGULAR': True, 'PROPAGATE_EXCEPTIONS': None, 'TRAP_BAD_REQUEST_ERRORS': False, 'JSON_SORT_KEYS': True, 'SESSION_COOKIE_HTTPONLY': True, 'SEND_FILE_MAX_AGE_DEFAULT': 43200, 'PUBLIC_COPR_HOSTNAME': 'copr01.casalogic.lan'}> -------------------------------------------------------------------------------- INFO [coprs] logging configuration finished, config: <Config {'JSON_AS_ASCII': True, 'INTRANET_IPS': ['127.0.0.1', '192.168.20.0/24'], 'KRB5_LOGIN': {'RH': {'log_text': 'Krb5 login', 'URI': 'casalogic', 'email_domain': 'CASALOGIC.LAN'}}, 'LOG_FILENAME': '/var/log/copr-frontend/frontend.log', 'DIST_GIT_URL': 'http://copr01.casalogic.lan/cgit', 'SQLALCHEMY_POOL_RECYCLE': None, 'OPENID_STORE': '/var/lib/copr/data/openid_store', 'BACKEND_BASE_URL': 'http://copr01.casalogic.lan', 'SQLALCHEMY_ECHO': False, 'SQLALCHEMY_TRACK_MODIFICATIONS': True, 'SEND_LOGS_TO': ['root@localhost'], 'SQLALCHEMY_POOL_TIMEOUT': None, 'SQLALCHEMY_RECORD_QUERIES': None, 'SESSION_COOKIE_DOMAIN': None, 'SESSION_COOKIE_NAME': 'session', 'SRPM_STORAGE_DIR': '/var/lib/copr/data/srpm_storage', 'KRB5_LOGIN_BASEURI': '/krb5_login/', 'WHOOSHEE_DIR': '/var/lib/copr/data/whooshee', 'REDIS_PORT': 6379, 'SQLALCHEMY_NATIVE_UNICODE': None, 'MAX_CONTENT_LENGTH': None, 'API_TOKEN_LENGTH': 30, 'DATABASE': '/var/lib/copr/data/copr.db', 'SEND_EMAILS': True, 'PERMANENT_SESSION_LIFETIME': datetime.timedelta(31), 'SQLALCHEMY_POOL_SIZE': None, 'SQLALCHEMY_MAX_OVERFLOW': None, 'SEND_LEGAL_TO': ['root@localhost'], 'TRAP_HTTP_EXCEPTIONS': False, 'PRESERVE_CONTEXT_ON_EXCEPTION': None, 'BUILDER_IPS': ['127.0.0.1'], 'DATA_DIR': '/var/lib/copr/data', 'API_TOKEN_EXPIRATION': 180, 'BACKEND_PASSWORD': 'mjp123', 'SESSION_COOKIE_PATH': None, 'COPR_DIST_GIT_LOGS_URL': 'http://copr01.casalogic.lan/per-task-logs', 'LOGGER_NAME': 'coprs', 'SECRET_KEY': 'mjp123', 'OPENID_FS_STORE_PATH': None, 'ENFORCE_PROTOCOL_FOR_BACKEND_URL': 'http', 'USE_ALLOWED_USERS': False, 'APPLICATION_ROOT': None, 'SERVER_NAME': None, 'PREFERRED_URL_SCHEME': 'http', 'TESTING': False, 'ENFORCE_PROTOCOL_FOR_FRONTEND_URL': 'http', 'ALLOWED_USERS': [], 'LOG_DIR': '/var/log/copr-frontend/', 'BLACKLISTED_GROUPS': ['fedorabugs', 'packager', 'provenpackager'], 'LOGGING_LEVEL': 10, 'USE_X_SENDFILE': False, 'SQLALCHEMY_DATABASE_URI': 'postgresql+psycopg2://copr-fe:coprpass@localhost/coprdb', 'SESSION_COOKIE_SECURE': False, 'REDIS_HOST': '127.0.0.1', 'DEBUG': True, 'SQLALCHEMY_COMMIT_ON_TEARDOWN': False, 'SQLALCHEMY_BINDS': None, 'REPO_GPGCHECK': 1, 'JSONIFY_PRETTYPRINT_REGULAR': True, 'PROPAGATE_EXCEPTIONS': None, 'TRAP_BAD_REQUEST_ERRORS': False, 'JSON_SORT_KEYS': True, 'SESSION_COOKIE_HTTPONLY': True, 'SEND_FILE_MAX_AGE_DEFAULT': 43200, 'PUBLIC_COPR_HOSTNAME': 'copr01.casalogic.lan'}> {'OpenID': <class 'flask_openid.OpenID'>, 'RedisConnectionProvider': <class 'coprs.helpers.RedisConnectionProvider'>, 'RedisSessionInterface': <class 'coprs.redis_session.RedisSessionInterface'>, 'SQLAlchemy': <class 'flask_sqlalchemy.SQLAlchemy'>, 'TeamsResponse': <class 'openid_teams.teams.TeamsResponse'>, 'URL_PREFIX': '/api_2', 'Whooshee': <class 'flask_whooshee.Whooshee'>, '__builtins__': {'ArithmeticError': <type 'exceptions.ArithmeticError'>, 'AssertionError': <type 'exceptions.AssertionError'>, 'AttributeError': <type 'exceptions.AttributeError'>, 'BaseException': <type 'exceptions.BaseException'>, 'BufferError': <type 'exceptions.BufferError'>, 'BytesWarning': <type 'exceptions.BytesWarning'>, 'DeprecationWarning': <type 'exceptions.DeprecationWarning'>, 'EOFError': <type 'exceptions.EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <type 'exceptions.EnvironmentError'>, 'Exception': <type 'exceptions.Exception'>, 'False': False, 'FloatingPointError': <type 'exceptions.FloatingPointError'>, 'FutureWarning': <type 'exceptions.FutureWarning'>, 'GeneratorExit': <type 'exceptions.GeneratorExit'>, 'IOError': <type 'exceptions.IOError'>, 'ImportError': <type 'exceptions.ImportError'>, 'ImportWarning': <type 'exceptions.ImportWarning'>, 'IndentationError': <type 'exceptions.IndentationError'>, 'IndexError': <type 'exceptions.IndexError'>, 'KeyError': <type 'exceptions.KeyError'>, 'KeyboardInterrupt': <type 'exceptions.KeyboardInterrupt'>, 'LookupError': <type 'exceptions.LookupError'>, 'MemoryError': <type 'exceptions.MemoryError'>, 'NameError': <type 'exceptions.NameError'>, 'None': None, 'NotImplemented': NotImplemented, 'NotImplementedError': <type 'exceptions.NotImplementedError'>, 'OSError': <type 'exceptions.OSError'>, 'OverflowError': <type 'exceptions.OverflowError'>, 'PendingDeprecationWarning': <type 'exceptions.PendingDeprecationWarning'>, 'ReferenceError': <type 'exceptions.ReferenceError'>, 'RuntimeError': <type 'exceptions.RuntimeError'>, 'RuntimeWarning': <type 'exceptions.RuntimeWarning'>, 'StandardError': <type 'exceptions.StandardError'>, 'StopIteration': <type 'exceptions.StopIteration'>, 'SyntaxError': <type 'exceptions.SyntaxError'>, 'SyntaxWarning': <type 'exceptions.SyntaxWarning'>, 'SystemError': <type 'exceptions.SystemError'>, 'SystemExit': <type 'exceptions.SystemExit'>, 'TabError': <type 'exceptions.TabError'>, 'True': True, 'TypeError': <type 'exceptions.TypeError'>, 'UnboundLocalError': <type 'exceptions.UnboundLocalError'>, 'UnicodeDecodeError': <type 'exceptions.UnicodeDecodeError'>, 'UnicodeEncodeError': <type 'exceptions.UnicodeEncodeError'>, 'UnicodeError': <type 'exceptions.UnicodeError'>, 'UnicodeTranslateError': <type 'exceptions.UnicodeTranslateError'>, 'UnicodeWarning': <type 'exceptions.UnicodeWarning'>, 'UserWarning': <type 'exceptions.UserWarning'>, 'ValueError': <type 'exceptions.ValueError'>, 'Warning': <type 'exceptions.Warning'>, 'ZeroDivisionError': <type 'exceptions.ZeroDivisionError'>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__name__': '__builtin__', '__package__': None, 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'apply': <built-in function apply>, 'basestring': <type 'basestring'>, 'bin': <built-in function bin>, 'bool': <type 'bool'>, 'buffer': <type 'buffer'>, 'bytearray': <type 'bytearray'>, 'bytes': <type 'str'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <type 'classmethod'>, 'cmp': <built-in function cmp>, 'coerce': <built-in function coerce>, 'compile': <built-in function compile>, 'complex': <type 'complex'>, 'copyright': Copyright (c) 2001-2013 Python Software Foundation. All Rights Reserved.
Copyright (c) 2000 BeOpen.com. All Rights Reserved.
Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.
Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands for supporting Python development. See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <type 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <type 'enumerate'>, 'eval': <built-in function eval>, 'execfile': <built-in function execfile>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'file': <type 'file'>, 'filter': <built-in function filter>, 'float': <type 'float'>, 'format': <built-in function format>, 'frozenset': <type 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <type 'int'>, 'intern': <built-in function intern>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': See http://www.python.org/2.7/license.html, 'list': <type 'list'>, 'locals': <built-in function locals>, 'long': <type 'long'>, 'map': <built-in function map>, 'max': <built-in function max>, 'memoryview': <type 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <type 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <type 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <built-in function range>, 'raw_input': <built-in function raw_input>, 'reduce': <built-in function reduce>, 'reload': <built-in function reload>, 'repr': <built-in function repr>, 'reversed': <type 'reversed'>, 'round': <built-in function round>, 'set': <type 'set'>, 'setattr': <built-in function setattr>, 'slice': <type 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <type 'staticmethod'>, 'str': <type 'str'>, 'sum': <built-in function sum>, 'super': <type 'super'>, 'tuple': <type 'tuple'>, 'type': <type 'type'>, 'unichr': <built-in function unichr>, 'unicode': <type 'unicode'>, 'vars': <built-in function vars>, 'xrange': <type 'xrange'>, 'zip': <built-in function zip>}, '__doc__': None, '__file__': '/usr/share/copr/coprs_frontend/coprs/__init__.pyc', '__name__': 'coprs', '__package__': 'coprs', '__path__': ['/usr/share/copr/coprs_frontend/coprs'], 'admin_general': <module 'coprs.views.admin_ns.admin_general' from '/usr/share/copr/coprs_frontend/coprs/views/admin_ns/admin_general.pyc'>, 'admin_ns': <module 'coprs.views.admin_ns' from '/usr/share/copr/coprs_frontend/coprs/views/admin_ns/__init__.pyc'>, 'api_general': <module 'coprs.views.api_ns.api_general' from '/usr/share/copr/coprs_frontend/coprs/views/api_ns/api_general.pyc'>, 'api_ns': <module 'coprs.views.api_ns' from '/usr/share/copr/coprs_frontend/coprs/views/api_ns/__init__.pyc'>, 'app': <Flask 'coprs'>, 'backend_general': <module 'coprs.views.backend_ns.backend_general' from '/usr/share/copr/coprs_frontend/coprs/views/backend_ns/backend_general.pyc'>, 'backend_ns': <module 'coprs.views.backend_ns' from '/usr/share/copr/coprs_frontend/coprs/views/backend_ns/__init__.pyc'>, 'config': <module 'coprs.config' from '/usr/share/copr/coprs_frontend/coprs/config.pyc'>, 'constants': <module 'coprs.constants' from '/usr/share/copr/coprs_frontend/coprs/constants.pyc'>, 'context_processors': <module 'coprs.context_processors' from '/usr/share/copr/coprs_frontend/coprs/context_processors.pyc'>, 'coprs': <module 'coprs' from '/usr/share/copr/coprs_frontend/coprs/__init__.pyc'>, 'coprs_builds': <module 'coprs.views.coprs_ns.coprs_builds' from '/usr/share/copr/coprs_frontend/coprs/views/coprs_ns/coprs_builds.pyc'>, 'coprs_chroots': <module 'coprs.views.coprs_ns.coprs_chroots' from '/usr/share/copr/coprs_frontend/coprs/views/coprs_ns/coprs_chroots.pyc'>, 'coprs_general': <module 'coprs.views.coprs_ns.coprs_general' from '/usr/share/copr/coprs_frontend/coprs/views/coprs_ns/coprs_general.pyc'>, 'coprs_ns': <module 'coprs.views.coprs_ns' from '/usr/share/copr/coprs_frontend/coprs/views/coprs_ns/__init__.pyc'>, 'coprs_packages': <module 'coprs.views.coprs_ns.coprs_packages' from '/usr/share/copr/coprs_frontend/coprs/views/coprs_ns/coprs_packages.pyc'>, 'db': <SQLAlchemy engine='postgresql+psycopg2://copr-fe:coprpass@localhost/coprdb'>, 'exceptions': <module 'coprs.exceptions' from '/usr/share/copr/coprs_frontend/coprs/exceptions.pyc'>, 'filters': <module 'coprs.filters' from '/usr/share/copr/coprs_frontend/coprs/filters.pyc'>, 'flask': <module 'flask' from '/usr/lib/python2.7/site-packages/flask/__init__.pyc'>, 'forms': <module 'coprs.forms' from '/usr/share/copr/coprs_frontend/coprs/forms.pyc'>, 'groups_general': <module 'coprs.views.groups_ns.groups_general' from '/usr/share/copr/coprs_frontend/coprs/views/groups_ns/groups_general.pyc'>, 'groups_ns': <flask.blueprints.Blueprint object at 0x3c7c410>, 'helpers': <module 'coprs.helpers' from '/usr/share/copr/coprs_frontend/coprs/helpers.pyc'>, 'include_banner': <function include_banner at 0x3cb59b0>, 'inject_fedmenu': <function inject_fedmenu at 0x3cb70c8>, 'log': <module 'coprs.log' from '/usr/share/copr/coprs_frontend/coprs/log.pyc'>, 'logic': <module 'coprs.logic' from '/usr/share/copr/coprs_frontend/coprs/logic/__init__.pyc'>, 'misc': <module 'coprs.views.misc' from '/usr/share/copr/coprs_frontend/coprs/views/misc.pyc'>, 'models': <module 'coprs.models' from '/usr/share/copr/coprs_frontend/coprs/models.pyc'>, 'models_committed': <blinker.base.NamedSignal object at 0x2d276d0; 'models-committed'>, 'oid': <flask_openid.OpenID object at 0x33f8810>, 'os': <module 'os' from '/usr/lib64/python2.7/os.pyc'>, 'pprint': <function pprint at 0x17faed8>, 'rcp': <coprs.helpers.RedisConnectionProvider object at 0x37d7cd0>, 'recent_general': <module 'coprs.views.recent_ns.recent_general' from '/usr/share/copr/coprs_frontend/coprs/views/recent_ns/recent_general.pyc'>, 'recent_ns': <module 'coprs.views.recent_ns' from '/usr/share/copr/coprs_frontend/coprs/views/recent_ns/__init__.pyc'>, 'redis_session': <module 'coprs.redis_session' from '/usr/share/copr/coprs_frontend/coprs/redis_session.pyc'>, 'register_api_error_handler': <function register_api_error_handler at 0x3f045f0>, 'rest_api': <module 'coprs.rest_api' from '/usr/share/copr/coprs_frontend/coprs/rest_api/__init__.pyc'>, 'rest_api_bp': <flask.blueprints.Blueprint object at 0x3f00190>, 'rmodels': <module 'coprs.rmodels' from '/usr/share/copr/coprs_frontend/coprs/rmodels.pyc'>, 'setup_log': <function setup_log at 0x35ea848>, 'stats_receiver': <module 'coprs.views.stats_ns.stats_receiver' from '/usr/share/copr/coprs_frontend/coprs/views/stats_ns/stats_receiver.pyc'>, 'status_general': <module 'coprs.views.status_ns.status_general' from '/usr/share/copr/coprs_frontend/coprs/views/status_ns/status_general.pyc'>, 'status_ns': <module 'coprs.views.status_ns' from '/usr/share/copr/coprs_frontend/coprs/views/status_ns/__init__.pyc'>, 'tmp_general': <module 'coprs.views.tmp_ns.tmp_general' from '/usr/share/copr/coprs_frontend/coprs/views/tmp_ns/tmp_general.pyc'>, 'tmp_ns': <module 'coprs.views.tmp_ns' from '/usr/share/copr/coprs_frontend/coprs/views/tmp_ns/__init__.pyc'>, 'views': <module 'coprs.views' from '/usr/share/copr/coprs_frontend/coprs/views/__init__.pyc'>, 'webhooks_general': <module 'coprs.views.webhooks_ns.webhooks_general' from '/usr/share/copr/coprs_frontend/coprs/views/webhooks_ns/webhooks_general.pyc'>, 'webhooks_ns': <flask.blueprints.Blueprint object at 0x3cb2bd0>, 'whooshee': <flask_whooshee.Whooshee object at 0x33f8d90>, 'whoosheers': <module 'coprs.whoosheers' from '/usr/share/copr/coprs_frontend/coprs/whoosheers.pyc'>, 'with_statement': _Feature((2, 5, 0, 'alpha', 1), (2, 6, 0, 'alpha', 0), 32768)} INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. INFO [alembic.runtime.migration] Running downgrade 414a86b37a0f -> 38f205566f20, add unique constraint on (copr_id, name) in package table Traceback (most recent call last): File "/usr/bin/alembic", line 9, in <module> load_entry_point('alembic==0.8.7', 'console_scripts', 'alembic')() File "/usr/lib/python2.7/site-packages/alembic/config.py", line 479, in main CommandLine(prog=prog).main(argv=argv) File "/usr/lib/python2.7/site-packages/alembic/config.py", line 473, in main self.run_cmd(cfg, options) File "/usr/lib/python2.7/site-packages/alembic/config.py", line 456, in run_cmd **dict((k, getattr(options, k)) for k in kwarg) File "/usr/lib/python2.7/site-packages/alembic/command.py", line 202, in downgrade script.run_env() File "/usr/lib/python2.7/site-packages/alembic/script/base.py", line 407, in run_env util.load_python_file(self.dir, 'env.py') File "/usr/lib/python2.7/site-packages/alembic/util/pyfiles.py", line 93, in load_python_file module = load_module_py(module_id, path) File "/usr/lib/python2.7/site-packages/alembic/util/compat.py", line 79, in load_module_py mod = imp.load_source(module_id, path, fp) File "alembic/env.py", line 73, in <module> run_migrations_online() File "alembic/env.py", line 66, in run_migrations_online context.run_migrations() File "<string>", line 8, in run_migrations File "/usr/lib/python2.7/site-packages/alembic/runtime/environment.py", line 797, in run_migrations self.get_context().run_migrations(**kw) File "/usr/lib/python2.7/site-packages/alembic/runtime/migration.py", line 312, in run_migrations step.migration_fn(**kw) File "/usr/share/copr/coprs_frontend/alembic/versions/414a86b37a0f_add_unique_constraint_on_copr_id_name_.py", line 22, in downgrade op.drop_constraint("packages_copr_pkgname", "package") File "<string>", line 8, in drop_constraint File "<string>", line 3, in drop_constraint File "/usr/lib/python2.7/site-packages/alembic/operations/ops.py", line 145, in drop_constraint return operations.invoke(op) File "/usr/lib/python2.7/site-packages/alembic/operations/base.py", line 318, in invoke return fn(self, operation) File "/usr/lib/python2.7/site-packages/alembic/operations/toimpl.py", line 146, in drop_constraint schema=operation.schema, File "/usr/lib/python2.7/site-packages/alembic/ddl/impl.py", line 183, in drop_constraint self._exec(schema.DropConstraint(const)) File "/usr/lib/python2.7/site-packages/alembic/ddl/impl.py", line 118, in _exec return conn.execute(construct, *multiparams, **params) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute return meth(self, multiparams, params) File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/ddl.py", line 68, in _execute_on_connection return connection._execute_ddl(self, multiparams, params) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 968, in _execute_ddl compiled File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context context) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception exc_info File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause reraise(type(exception), exception, tb=exc_tb) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context context) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) constraint "packages_copr_pkgname" of relation "package" does not exist [SQL: 'ALTER TABLE package DROP CONSTRAINT packages_copr_pkgname']
/Martin
----- Original meddelelse ----- Fra: "Michal Novotny" clime@redhat.com Til: "copr-devel" copr-devel@lists.fedorahosted.org Sendt: onsdag, 16. november 2016 16:08:27 Emne: | Re: missing status_to_order function
"Next" meaning one after the upcoming release :).
On Wed, Nov 16, 2016 at 4:06 PM, Michal Novotny < clime@redhat.com > wrote:
On Wed, Nov 16, 2016 at 3:38 PM, Martin Juhl < mj@casalogic.dk > wrote:
BQ_BEGIN Hi
When trying to access the build and package pages I get:
ProgrammingError: (psycopg2.ProgrammingError) function status_to_order(integer) does not exist LINE 8: ...LECT build_chroot.build_id, started_on, ended_on, status_to_... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. [SQL: '\nSELECT build.id , MAX( package.name ) AS pkg_name, build.pkg_version, build.submitted_on,\n MIN(statuses.started_on) AS started_on, MAX(statuses.ended_on) AS ended_on, order_to_status(MIN( statuses.st )) AS status,\n build.canceled, MIN("group".name) AS group_name, MIN( copr.name ) as copr_name, MIN("user".username) as user_name\nFROM build\nLEFT OUTER JOIN package\n ON build.package_id = package.id \nLEFT OUTER JOIN (SELECT build_chroot.build_id, started_on, ended_on, status_to_order(status) AS st FROM build_chroot) AS statuses\n ON statuses.build_id= build.id \nLEFT OUTER JOIN copr\n ON copr.id = build.copr_id\nLEFT OUTER JOIN "user"\n ON copr.user_id = "user".id\nLEFT OUTER JOIN "group"\n ON copr.group_id = "group".id\nWHERE build.copr_id = %(copr_id)s\nGROUP BY\n build.id ;\n'] [parameters: {'copr_id': 1}]
Seems like the function "status_to_order" is missing.. I have tried upgrading to python-psycopg2-2.6.1-1.. no change...
Any suggestions???
You need to run:
~/copr/frontend/coprs_frontend $ COPR_CONFIG=/etc/copr/copr.conf alembic downgrade 3ec22e1db75a ~/copr/frontend/coprs_frontend $ COPR_CONFIG=/etc/copr/copr.conf alembic upgrade head
"./manage.py create_db --alembic alembic.ini" installation instruction from copr-setup.txt is creating db according to COPR flask models but this db function is defined purely in alembic revisions. In the next release, this will be fixed.
BQ_BEGIN /Martin _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
BQ_END
_______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
BQ_END
_______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) constraint
"packages_copr_pkgname" of relation "package" does not exist
How old sources do you have? This has been fixed in https://pagure.io/copr/copr/c/e47e6cd41c3e72f58a38a0f25b95b1e5c92b19de?branc... .
Please upgrade to the latest sources (or downgrade to the latest stable release *copr-frontend-1.103-1* https://pagure.io/copr/copr/tree/4978dee05ae712bb18e7baead49532586457b276 :)) and setup your db from scratch (dropdb coprdb; createdb coprdb; ./manage.py create_db --alembic alembic.ini) and then run alembic downgrade ... and alembic upgrade head.
clime
Hi
I'm using version 1.103-1.git.5.682e0d9.el7.centos.. taken from the https://copr.fedorainfracloud.org/coprs/g/copr/copr/package/copr-frontend/ repository, and just rebuild for CentOS...
Should I use the 1.103-1.fc23 release instead???
Regards
Martin
[root@copr01 ~]# su - postgres -c 'dropdb coprdb' [root@copr01 ~]# su - postgres -c 'PGPASSWORD=coprpass ; createdb -E UTF8 coprdb' [root@copr01 ~]# cd /usr/share/copr/coprs_frontend/ [root@copr01 coprs_frontend]# ./manage.py create_db --alembic alembic.ini -------------------------------------------------------------------------------- INFO in log [/usr/share/copr/coprs_frontend/coprs/log.py:48]: logging configuration finished, config: <Config {'JSON_AS_ASCII': True, 'INTRANET_IPS': ['127.0.0.1', '192.168.20.0/24'], 'KRB5_LOGIN': {'RH': {'log_text': 'Krb5 login', 'URI': 'casalogic', 'email_domain': 'CASALOGIC.LAN'}}, 'LOG_FILENAME': '/var/log/copr-frontend/frontend.log', 'DIST_GIT_URL': 'http://copr01.casalogic.lan/cgit', 'SQLALCHEMY_POOL_RECYCLE': None, 'OPENID_STORE': '/var/lib/copr/data/openid_store', 'BACKEND_BASE_URL': 'http://copr01.casalogic.lan', 'SQLALCHEMY_ECHO': False, 'SQLALCHEMY_TRACK_MODIFICATIONS': True, 'SEND_LOGS_TO': ['root@localhost'], 'SQLALCHEMY_POOL_TIMEOUT': None, 'SQLALCHEMY_RECORD_QUERIES': None, 'SESSION_COOKIE_DOMAIN': None, 'SESSION_COOKIE_NAME': 'session', 'SRPM_STORAGE_DIR': '/var/lib/copr/data/srpm_storage', 'KRB5_LOGIN_BASEURI': '/krb5_login/', 'WHOOSHEE_DIR': '/var/lib/copr/data/whooshee', 'REDIS_PORT': 6379, 'SQLALCHEMY_NATIVE_UNICODE': None, 'MAX_CONTENT_LENGTH': None, 'API_TOKEN_LENGTH': 30, 'DATABASE': '/var/lib/copr/data/copr.db', 'SEND_EMAILS': True, 'PERMANENT_SESSION_LIFETIME': datetime.timedelta(31), 'SQLALCHEMY_POOL_SIZE': None, 'SQLALCHEMY_MAX_OVERFLOW': None, 'SEND_LEGAL_TO': ['root@localhost'], 'TRAP_HTTP_EXCEPTIONS': False, 'PRESERVE_CONTEXT_ON_EXCEPTION': None, 'BUILDER_IPS': ['127.0.0.1'], 'DATA_DIR': '/var/lib/copr/data', 'API_TOKEN_EXPIRATION': 180, 'BACKEND_PASSWORD': 'mjp123', 'SESSION_COOKIE_PATH': None, 'COPR_DIST_GIT_LOGS_URL': 'http://copr01.casalogic.lan/per-task-logs', 'LOGGER_NAME': 'coprs', 'SECRET_KEY': 'mjp123', 'OPENID_FS_STORE_PATH': None, 'ENFORCE_PROTOCOL_FOR_BACKEND_URL': 'http', 'USE_ALLOWED_USERS': False, 'APPLICATION_ROOT': None, 'SERVER_NAME': None, 'PREFERRED_URL_SCHEME': 'http', 'TESTING': False, 'ENFORCE_PROTOCOL_FOR_FRONTEND_URL': 'http', 'ALLOWED_USERS': [], 'LOG_DIR': '/var/log/copr-frontend/', 'BLACKLISTED_GROUPS': ['fedorabugs', 'packager', 'provenpackager'], 'LOGGING_LEVEL': 10, 'USE_X_SENDFILE': False, 'SQLALCHEMY_DATABASE_URI': 'postgresql+psycopg2://copr-fe:coprpass@localhost/coprdb', 'SESSION_COOKIE_SECURE': False, 'REDIS_HOST': '127.0.0.1', 'DEBUG': True, 'SQLALCHEMY_COMMIT_ON_TEARDOWN': False, 'SQLALCHEMY_BINDS': None, 'REPO_GPGCHECK': 1, 'JSONIFY_PRETTYPRINT_REGULAR': True, 'PROPAGATE_EXCEPTIONS': None, 'TRAP_BAD_REQUEST_ERRORS': False, 'JSON_SORT_KEYS': True, 'SESSION_COOKIE_HTTPONLY': True, 'SEND_FILE_MAX_AGE_DEFAULT': 43200, 'PUBLIC_COPR_HOSTNAME': 'copr01.casalogic.lan'}> -------------------------------------------------------------------------------- {'OpenID': <class 'flask_openid.OpenID'>, 'RedisConnectionProvider': <class 'coprs.helpers.RedisConnectionProvider'>, 'RedisSessionInterface': <class 'coprs.redis_session.RedisSessionInterface'>, 'SQLAlchemy': <class 'flask_sqlalchemy.SQLAlchemy'>, 'TeamsResponse': <class 'openid_teams.teams.TeamsResponse'>, 'URL_PREFIX': '/api_2', 'Whooshee': <class 'flask_whooshee.Whooshee'>, '__builtins__': {'ArithmeticError': <type 'exceptions.ArithmeticError'>, 'AssertionError': <type 'exceptions.AssertionError'>, 'AttributeError': <type 'exceptions.AttributeError'>, 'BaseException': <type 'exceptions.BaseException'>, 'BufferError': <type 'exceptions.BufferError'>, 'BytesWarning': <type 'exceptions.BytesWarning'>, 'DeprecationWarning': <type 'exceptions.DeprecationWarning'>, 'EOFError': <type 'exceptions.EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <type 'exceptions.EnvironmentError'>, 'Exception': <type 'exceptions.Exception'>, 'False': False, 'FloatingPointError': <type 'exceptions.FloatingPointError'>, 'FutureWarning': <type 'exceptions.FutureWarning'>, 'GeneratorExit': <type 'exceptions.GeneratorExit'>, 'IOError': <type 'exceptions.IOError'>, 'ImportError': <type 'exceptions.ImportError'>, 'ImportWarning': <type 'exceptions.ImportWarning'>, 'IndentationError': <type 'exceptions.IndentationError'>, 'IndexError': <type 'exceptions.IndexError'>, 'KeyError': <type 'exceptions.KeyError'>, 'KeyboardInterrupt': <type 'exceptions.KeyboardInterrupt'>, 'LookupError': <type 'exceptions.LookupError'>, 'MemoryError': <type 'exceptions.MemoryError'>, 'NameError': <type 'exceptions.NameError'>, 'None': None, 'NotImplemented': NotImplemented, 'NotImplementedError': <type 'exceptions.NotImplementedError'>, 'OSError': <type 'exceptions.OSError'>, 'OverflowError': <type 'exceptions.OverflowError'>, 'PendingDeprecationWarning': <type 'exceptions.PendingDeprecationWarning'>, 'ReferenceError': <type 'exceptions.ReferenceError'>, 'RuntimeError': <type 'exceptions.RuntimeError'>, 'RuntimeWarning': <type 'exceptions.RuntimeWarning'>, 'StandardError': <type 'exceptions.StandardError'>, 'StopIteration': <type 'exceptions.StopIteration'>, 'SyntaxError': <type 'exceptions.SyntaxError'>, 'SyntaxWarning': <type 'exceptions.SyntaxWarning'>, 'SystemError': <type 'exceptions.SystemError'>, 'SystemExit': <type 'exceptions.SystemExit'>, 'TabError': <type 'exceptions.TabError'>, 'True': True, 'TypeError': <type 'exceptions.TypeError'>, 'UnboundLocalError': <type 'exceptions.UnboundLocalError'>, 'UnicodeDecodeError': <type 'exceptions.UnicodeDecodeError'>, 'UnicodeEncodeError': <type 'exceptions.UnicodeEncodeError'>, 'UnicodeError': <type 'exceptions.UnicodeError'>, 'UnicodeTranslateError': <type 'exceptions.UnicodeTranslateError'>, 'UnicodeWarning': <type 'exceptions.UnicodeWarning'>, 'UserWarning': <type 'exceptions.UserWarning'>, 'ValueError': <type 'exceptions.ValueError'>, 'Warning': <type 'exceptions.Warning'>, 'ZeroDivisionError': <type 'exceptions.ZeroDivisionError'>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__name__': '__builtin__', '__package__': None, 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'apply': <built-in function apply>, 'basestring': <type 'basestring'>, 'bin': <built-in function bin>, 'bool': <type 'bool'>, 'buffer': <type 'buffer'>, 'bytearray': <type 'bytearray'>, 'bytes': <type 'str'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <type 'classmethod'>, 'cmp': <built-in function cmp>, 'coerce': <built-in function coerce>, 'compile': <built-in function compile>, 'complex': <type 'complex'>, 'copyright': Copyright (c) 2001-2013 Python Software Foundation. All Rights Reserved.
Copyright (c) 2000 BeOpen.com. All Rights Reserved.
Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.
Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands for supporting Python development. See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <type 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <type 'enumerate'>, 'eval': <built-in function eval>, 'execfile': <built-in function execfile>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'file': <type 'file'>, 'filter': <built-in function filter>, 'float': <type 'float'>, 'format': <built-in function format>, 'frozenset': <type 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <type 'int'>, 'intern': <built-in function intern>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': See http://www.python.org/2.7/license.html, 'list': <type 'list'>, 'locals': <built-in function locals>, 'long': <type 'long'>, 'map': <built-in function map>, 'max': <built-in function max>, 'memoryview': <type 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <type 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <type 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <built-in function range>, 'raw_input': <built-in function raw_input>, 'reduce': <built-in function reduce>, 'reload': <built-in function reload>, 'repr': <built-in function repr>, 'reversed': <type 'reversed'>, 'round': <built-in function round>, 'set': <type 'set'>, 'setattr': <built-in function setattr>, 'slice': <type 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <type 'staticmethod'>, 'str': <type 'str'>, 'sum': <built-in function sum>, 'super': <type 'super'>, 'tuple': <type 'tuple'>, 'type': <type 'type'>, 'unichr': <built-in function unichr>, 'unicode': <type 'unicode'>, 'vars': <built-in function vars>, 'xrange': <type 'xrange'>, 'zip': <built-in function zip>}, '__doc__': None, '__file__': '/usr/share/copr/coprs_frontend/coprs/__init__.pyc', '__name__': 'coprs', '__package__': 'coprs', '__path__': ['/usr/share/copr/coprs_frontend/coprs'], 'admin_general': <module 'coprs.views.admin_ns.admin_general' from '/usr/share/copr/coprs_frontend/coprs/views/admin_ns/admin_general.pyc'>, 'admin_ns': <module 'coprs.views.admin_ns' from '/usr/share/copr/coprs_frontend/coprs/views/admin_ns/__init__.pyc'>, 'api_general': <module 'coprs.views.api_ns.api_general' from '/usr/share/copr/coprs_frontend/coprs/views/api_ns/api_general.pyc'>, 'api_ns': <module 'coprs.views.api_ns' from '/usr/share/copr/coprs_frontend/coprs/views/api_ns/__init__.pyc'>, 'app': <Flask 'coprs'>, 'backend_general': <module 'coprs.views.backend_ns.backend_general' from '/usr/share/copr/coprs_frontend/coprs/views/backend_ns/backend_general.pyc'>, 'backend_ns': <module 'coprs.views.backend_ns' from '/usr/share/copr/coprs_frontend/coprs/views/backend_ns/__init__.pyc'>, 'config': <module 'coprs.config' from '/usr/share/copr/coprs_frontend/coprs/config.pyc'>, 'constants': <module 'coprs.constants' from '/usr/share/copr/coprs_frontend/coprs/constants.pyc'>, 'context_processors': <module 'coprs.context_processors' from '/usr/share/copr/coprs_frontend/coprs/context_processors.pyc'>, 'coprs': <module 'coprs' from '/usr/share/copr/coprs_frontend/coprs/__init__.pyc'>, 'coprs_builds': <module 'coprs.views.coprs_ns.coprs_builds' from '/usr/share/copr/coprs_frontend/coprs/views/coprs_ns/coprs_builds.pyc'>, 'coprs_chroots': <module 'coprs.views.coprs_ns.coprs_chroots' from '/usr/share/copr/coprs_frontend/coprs/views/coprs_ns/coprs_chroots.pyc'>, 'coprs_general': <module 'coprs.views.coprs_ns.coprs_general' from '/usr/share/copr/coprs_frontend/coprs/views/coprs_ns/coprs_general.pyc'>, 'coprs_ns': <module 'coprs.views.coprs_ns' from '/usr/share/copr/coprs_frontend/coprs/views/coprs_ns/__init__.pyc'>, 'coprs_packages': <module 'coprs.views.coprs_ns.coprs_packages' from '/usr/share/copr/coprs_frontend/coprs/views/coprs_ns/coprs_packages.pyc'>, 'db': <SQLAlchemy engine='postgresql+psycopg2://copr-fe:coprpass@localhost/coprdb'>, 'exceptions': <module 'coprs.exceptions' from '/usr/share/copr/coprs_frontend/coprs/exceptions.pyc'>, 'filters': <module 'coprs.filters' from '/usr/share/copr/coprs_frontend/coprs/filters.pyc'>, 'flask': <module 'flask' from '/usr/lib/python2.7/site-packages/flask/__init__.pyc'>, 'forms': <module 'coprs.forms' from '/usr/share/copr/coprs_frontend/coprs/forms.pyc'>, 'groups_general': <module 'coprs.views.groups_ns.groups_general' from '/usr/share/copr/coprs_frontend/coprs/views/groups_ns/groups_general.pyc'>, 'groups_ns': <flask.blueprints.Blueprint object at 0x3e7a050>, 'helpers': <module 'coprs.helpers' from '/usr/share/copr/coprs_frontend/coprs/helpers.pyc'>, 'include_banner': <function include_banner at 0x3ff98c0>, 'inject_fedmenu': <function inject_fedmenu at 0x3ff9f50>, 'log': <module 'coprs.log' from '/usr/share/copr/coprs_frontend/coprs/log.pyc'>, 'logic': <module 'coprs.logic' from '/usr/share/copr/coprs_frontend/coprs/logic/__init__.pyc'>, 'misc': <module 'coprs.views.misc' from '/usr/share/copr/coprs_frontend/coprs/views/misc.pyc'>, 'models': <module 'coprs.models' from '/usr/share/copr/coprs_frontend/coprs/models.pyc'>, 'models_committed': <blinker.base.NamedSignal object at 0x2dcb510; 'models-committed'>, 'oid': <flask_openid.OpenID object at 0x35d8410>, 'os': <module 'os' from '/usr/lib64/python2.7/os.pyc'>, 'pprint': <function pprint at 0x2919de8>, 'rcp': <coprs.helpers.RedisConnectionProvider object at 0x3bf0f50>, 'recent_general': <module 'coprs.views.recent_ns.recent_general' from '/usr/share/copr/coprs_frontend/coprs/views/recent_ns/recent_general.pyc'>, 'recent_ns': <module 'coprs.views.recent_ns' from '/usr/share/copr/coprs_frontend/coprs/views/recent_ns/__init__.pyc'>, 'redis_session': <module 'coprs.redis_session' from '/usr/share/copr/coprs_frontend/coprs/redis_session.pyc'>, 'register_api_error_handler': <function register_api_error_handler at 0x424f500>, 'rest_api': <module 'coprs.rest_api' from '/usr/share/copr/coprs_frontend/coprs/rest_api/__init__.pyc'>, 'rest_api_bp': <flask.blueprints.Blueprint object at 0x41f1d90>, 'rmodels': <module 'coprs.rmodels' from '/usr/share/copr/coprs_frontend/coprs/rmodels.pyc'>, 'setup_log': <function setup_log at 0x3a84938>, 'stats_receiver': <module 'coprs.views.stats_ns.stats_receiver' from '/usr/share/copr/coprs_frontend/coprs/views/stats_ns/stats_receiver.pyc'>, 'status_general': <module 'coprs.views.status_ns.status_general' from '/usr/share/copr/coprs_frontend/coprs/views/status_ns/status_general.pyc'>, 'status_ns': <module 'coprs.views.status_ns' from '/usr/share/copr/coprs_frontend/coprs/views/status_ns/__init__.pyc'>, 'tmp_general': <module 'coprs.views.tmp_ns.tmp_general' from '/usr/share/copr/coprs_frontend/coprs/views/tmp_ns/tmp_general.pyc'>, 'tmp_ns': <module 'coprs.views.tmp_ns' from '/usr/share/copr/coprs_frontend/coprs/views/tmp_ns/__init__.pyc'>, 'views': <module 'coprs.views' from '/usr/share/copr/coprs_frontend/coprs/views/__init__.pyc'>, 'webhooks_general': <module 'coprs.views.webhooks_ns.webhooks_general' from '/usr/share/copr/coprs_frontend/coprs/views/webhooks_ns/webhooks_general.pyc'>, 'webhooks_ns': <flask.blueprints.Blueprint object at 0x3ffa810>, 'whooshee': <flask_whooshee.Whooshee object at 0x35d8990>, 'whoosheers': <module 'coprs.whoosheers' from '/usr/share/copr/coprs_frontend/coprs/whoosheers.pyc'>, 'with_statement': _Feature((2, 5, 0, 'alpha', 1), (2, 6, 0, 'alpha', 0), 32768)} INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. INFO [alembic.runtime.migration] Running stamp_revision -> 414a86b37a0f [root@copr01 coprs_frontend]# COPR_CONFIG=/etc/copr/copr.conf alembic downgrade 3ec22e1db75a -------------------------------------------------------------------------------- INFO in log [/usr/share/copr/coprs_frontend/coprs/log.py:48]: logging configuration finished, config: <Config {'JSON_AS_ASCII': True, 'INTRANET_IPS': ['127.0.0.1', '192.168.20.0/24'], 'KRB5_LOGIN': {'RH': {'log_text': 'Krb5 login', 'URI': 'casalogic', 'email_domain': 'CASALOGIC.LAN'}}, 'LOG_FILENAME': '/var/log/copr-frontend/frontend.log', 'DIST_GIT_URL': 'http://copr01.casalogic.lan/cgit', 'SQLALCHEMY_POOL_RECYCLE': None, 'OPENID_STORE': '/var/lib/copr/data/openid_store', 'BACKEND_BASE_URL': 'http://copr01.casalogic.lan', 'SQLALCHEMY_ECHO': False, 'SQLALCHEMY_TRACK_MODIFICATIONS': True, 'SEND_LOGS_TO': ['root@localhost'], 'SQLALCHEMY_POOL_TIMEOUT': None, 'SQLALCHEMY_RECORD_QUERIES': None, 'SESSION_COOKIE_DOMAIN': None, 'SESSION_COOKIE_NAME': 'session', 'SRPM_STORAGE_DIR': '/var/lib/copr/data/srpm_storage', 'KRB5_LOGIN_BASEURI': '/krb5_login/', 'WHOOSHEE_DIR': '/var/lib/copr/data/whooshee', 'REDIS_PORT': 6379, 'SQLALCHEMY_NATIVE_UNICODE': None, 'MAX_CONTENT_LENGTH': None, 'API_TOKEN_LENGTH': 30, 'DATABASE': '/var/lib/copr/data/copr.db', 'SEND_EMAILS': True, 'PERMANENT_SESSION_LIFETIME': datetime.timedelta(31), 'SQLALCHEMY_POOL_SIZE': None, 'SQLALCHEMY_MAX_OVERFLOW': None, 'SEND_LEGAL_TO': ['root@localhost'], 'TRAP_HTTP_EXCEPTIONS': False, 'PRESERVE_CONTEXT_ON_EXCEPTION': None, 'BUILDER_IPS': ['127.0.0.1'], 'DATA_DIR': '/var/lib/copr/data', 'API_TOKEN_EXPIRATION': 180, 'BACKEND_PASSWORD': 'mjp123', 'SESSION_COOKIE_PATH': None, 'COPR_DIST_GIT_LOGS_URL': 'http://copr01.casalogic.lan/per-task-logs', 'LOGGER_NAME': 'coprs', 'SECRET_KEY': 'mjp123', 'OPENID_FS_STORE_PATH': None, 'ENFORCE_PROTOCOL_FOR_BACKEND_URL': 'http', 'USE_ALLOWED_USERS': False, 'APPLICATION_ROOT': None, 'SERVER_NAME': None, 'PREFERRED_URL_SCHEME': 'http', 'TESTING': False, 'ENFORCE_PROTOCOL_FOR_FRONTEND_URL': 'http', 'ALLOWED_USERS': [], 'LOG_DIR': '/var/log/copr-frontend/', 'BLACKLISTED_GROUPS': ['fedorabugs', 'packager', 'provenpackager'], 'LOGGING_LEVEL': 10, 'USE_X_SENDFILE': False, 'SQLALCHEMY_DATABASE_URI': 'postgresql+psycopg2://copr-fe:coprpass@localhost/coprdb', 'SESSION_COOKIE_SECURE': False, 'REDIS_HOST': '127.0.0.1', 'DEBUG': True, 'SQLALCHEMY_COMMIT_ON_TEARDOWN': False, 'SQLALCHEMY_BINDS': None, 'REPO_GPGCHECK': 1, 'JSONIFY_PRETTYPRINT_REGULAR': True, 'PROPAGATE_EXCEPTIONS': None, 'TRAP_BAD_REQUEST_ERRORS': False, 'JSON_SORT_KEYS': True, 'SESSION_COOKIE_HTTPONLY': True, 'SEND_FILE_MAX_AGE_DEFAULT': 43200, 'PUBLIC_COPR_HOSTNAME': 'copr01.casalogic.lan'}> -------------------------------------------------------------------------------- INFO [coprs] logging configuration finished, config: <Config {'JSON_AS_ASCII': True, 'INTRANET_IPS': ['127.0.0.1', '192.168.20.0/24'], 'KRB5_LOGIN': {'RH': {'log_text': 'Krb5 login', 'URI': 'casalogic', 'email_domain': 'CASALOGIC.LAN'}}, 'LOG_FILENAME': '/var/log/copr-frontend/frontend.log', 'DIST_GIT_URL': 'http://copr01.casalogic.lan/cgit', 'SQLALCHEMY_POOL_RECYCLE': None, 'OPENID_STORE': '/var/lib/copr/data/openid_store', 'BACKEND_BASE_URL': 'http://copr01.casalogic.lan', 'SQLALCHEMY_ECHO': False, 'SQLALCHEMY_TRACK_MODIFICATIONS': True, 'SEND_LOGS_TO': ['root@localhost'], 'SQLALCHEMY_POOL_TIMEOUT': None, 'SQLALCHEMY_RECORD_QUERIES': None, 'SESSION_COOKIE_DOMAIN': None, 'SESSION_COOKIE_NAME': 'session', 'SRPM_STORAGE_DIR': '/var/lib/copr/data/srpm_storage', 'KRB5_LOGIN_BASEURI': '/krb5_login/', 'WHOOSHEE_DIR': '/var/lib/copr/data/whooshee', 'REDIS_PORT': 6379, 'SQLALCHEMY_NATIVE_UNICODE': None, 'MAX_CONTENT_LENGTH': None, 'API_TOKEN_LENGTH': 30, 'DATABASE': '/var/lib/copr/data/copr.db', 'SEND_EMAILS': True, 'PERMANENT_SESSION_LIFETIME': datetime.timedelta(31), 'SQLALCHEMY_POOL_SIZE': None, 'SQLALCHEMY_MAX_OVERFLOW': None, 'SEND_LEGAL_TO': ['root@localhost'], 'TRAP_HTTP_EXCEPTIONS': False, 'PRESERVE_CONTEXT_ON_EXCEPTION': None, 'BUILDER_IPS': ['127.0.0.1'], 'DATA_DIR': '/var/lib/copr/data', 'API_TOKEN_EXPIRATION': 180, 'BACKEND_PASSWORD': 'mjp123', 'SESSION_COOKIE_PATH': None, 'COPR_DIST_GIT_LOGS_URL': 'http://copr01.casalogic.lan/per-task-logs', 'LOGGER_NAME': 'coprs', 'SECRET_KEY': 'mjp123', 'OPENID_FS_STORE_PATH': None, 'ENFORCE_PROTOCOL_FOR_BACKEND_URL': 'http', 'USE_ALLOWED_USERS': False, 'APPLICATION_ROOT': None, 'SERVER_NAME': None, 'PREFERRED_URL_SCHEME': 'http', 'TESTING': False, 'ENFORCE_PROTOCOL_FOR_FRONTEND_URL': 'http', 'ALLOWED_USERS': [], 'LOG_DIR': '/var/log/copr-frontend/', 'BLACKLISTED_GROUPS': ['fedorabugs', 'packager', 'provenpackager'], 'LOGGING_LEVEL': 10, 'USE_X_SENDFILE': False, 'SQLALCHEMY_DATABASE_URI': 'postgresql+psycopg2://copr-fe:coprpass@localhost/coprdb', 'SESSION_COOKIE_SECURE': False, 'REDIS_HOST': '127.0.0.1', 'DEBUG': True, 'SQLALCHEMY_COMMIT_ON_TEARDOWN': False, 'SQLALCHEMY_BINDS': None, 'REPO_GPGCHECK': 1, 'JSONIFY_PRETTYPRINT_REGULAR': True, 'PROPAGATE_EXCEPTIONS': None, 'TRAP_BAD_REQUEST_ERRORS': False, 'JSON_SORT_KEYS': True, 'SESSION_COOKIE_HTTPONLY': True, 'SEND_FILE_MAX_AGE_DEFAULT': 43200, 'PUBLIC_COPR_HOSTNAME': 'copr01.casalogic.lan'}> {'OpenID': <class 'flask_openid.OpenID'>, 'RedisConnectionProvider': <class 'coprs.helpers.RedisConnectionProvider'>, 'RedisSessionInterface': <class 'coprs.redis_session.RedisSessionInterface'>, 'SQLAlchemy': <class 'flask_sqlalchemy.SQLAlchemy'>, 'TeamsResponse': <class 'openid_teams.teams.TeamsResponse'>, 'URL_PREFIX': '/api_2', 'Whooshee': <class 'flask_whooshee.Whooshee'>, '__builtins__': {'ArithmeticError': <type 'exceptions.ArithmeticError'>, 'AssertionError': <type 'exceptions.AssertionError'>, 'AttributeError': <type 'exceptions.AttributeError'>, 'BaseException': <type 'exceptions.BaseException'>, 'BufferError': <type 'exceptions.BufferError'>, 'BytesWarning': <type 'exceptions.BytesWarning'>, 'DeprecationWarning': <type 'exceptions.DeprecationWarning'>, 'EOFError': <type 'exceptions.EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <type 'exceptions.EnvironmentError'>, 'Exception': <type 'exceptions.Exception'>, 'False': False, 'FloatingPointError': <type 'exceptions.FloatingPointError'>, 'FutureWarning': <type 'exceptions.FutureWarning'>, 'GeneratorExit': <type 'exceptions.GeneratorExit'>, 'IOError': <type 'exceptions.IOError'>, 'ImportError': <type 'exceptions.ImportError'>, 'ImportWarning': <type 'exceptions.ImportWarning'>, 'IndentationError': <type 'exceptions.IndentationError'>, 'IndexError': <type 'exceptions.IndexError'>, 'KeyError': <type 'exceptions.KeyError'>, 'KeyboardInterrupt': <type 'exceptions.KeyboardInterrupt'>, 'LookupError': <type 'exceptions.LookupError'>, 'MemoryError': <type 'exceptions.MemoryError'>, 'NameError': <type 'exceptions.NameError'>, 'None': None, 'NotImplemented': NotImplemented, 'NotImplementedError': <type 'exceptions.NotImplementedError'>, 'OSError': <type 'exceptions.OSError'>, 'OverflowError': <type 'exceptions.OverflowError'>, 'PendingDeprecationWarning': <type 'exceptions.PendingDeprecationWarning'>, 'ReferenceError': <type 'exceptions.ReferenceError'>, 'RuntimeError': <type 'exceptions.RuntimeError'>, 'RuntimeWarning': <type 'exceptions.RuntimeWarning'>, 'StandardError': <type 'exceptions.StandardError'>, 'StopIteration': <type 'exceptions.StopIteration'>, 'SyntaxError': <type 'exceptions.SyntaxError'>, 'SyntaxWarning': <type 'exceptions.SyntaxWarning'>, 'SystemError': <type 'exceptions.SystemError'>, 'SystemExit': <type 'exceptions.SystemExit'>, 'TabError': <type 'exceptions.TabError'>, 'True': True, 'TypeError': <type 'exceptions.TypeError'>, 'UnboundLocalError': <type 'exceptions.UnboundLocalError'>, 'UnicodeDecodeError': <type 'exceptions.UnicodeDecodeError'>, 'UnicodeEncodeError': <type 'exceptions.UnicodeEncodeError'>, 'UnicodeError': <type 'exceptions.UnicodeError'>, 'UnicodeTranslateError': <type 'exceptions.UnicodeTranslateError'>, 'UnicodeWarning': <type 'exceptions.UnicodeWarning'>, 'UserWarning': <type 'exceptions.UserWarning'>, 'ValueError': <type 'exceptions.ValueError'>, 'Warning': <type 'exceptions.Warning'>, 'ZeroDivisionError': <type 'exceptions.ZeroDivisionError'>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__name__': '__builtin__', '__package__': None, 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'apply': <built-in function apply>, 'basestring': <type 'basestring'>, 'bin': <built-in function bin>, 'bool': <type 'bool'>, 'buffer': <type 'buffer'>, 'bytearray': <type 'bytearray'>, 'bytes': <type 'str'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <type 'classmethod'>, 'cmp': <built-in function cmp>, 'coerce': <built-in function coerce>, 'compile': <built-in function compile>, 'complex': <type 'complex'>, 'copyright': Copyright (c) 2001-2013 Python Software Foundation. All Rights Reserved.
Copyright (c) 2000 BeOpen.com. All Rights Reserved.
Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.
Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands for supporting Python development. See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <type 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <type 'enumerate'>, 'eval': <built-in function eval>, 'execfile': <built-in function execfile>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'file': <type 'file'>, 'filter': <built-in function filter>, 'float': <type 'float'>, 'format': <built-in function format>, 'frozenset': <type 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <type 'int'>, 'intern': <built-in function intern>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': See http://www.python.org/2.7/license.html, 'list': <type 'list'>, 'locals': <built-in function locals>, 'long': <type 'long'>, 'map': <built-in function map>, 'max': <built-in function max>, 'memoryview': <type 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <type 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <type 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <built-in function range>, 'raw_input': <built-in function raw_input>, 'reduce': <built-in function reduce>, 'reload': <built-in function reload>, 'repr': <built-in function repr>, 'reversed': <type 'reversed'>, 'round': <built-in function round>, 'set': <type 'set'>, 'setattr': <built-in function setattr>, 'slice': <type 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <type 'staticmethod'>, 'str': <type 'str'>, 'sum': <built-in function sum>, 'super': <type 'super'>, 'tuple': <type 'tuple'>, 'type': <type 'type'>, 'unichr': <built-in function unichr>, 'unicode': <type 'unicode'>, 'vars': <built-in function vars>, 'xrange': <type 'xrange'>, 'zip': <built-in function zip>}, '__doc__': None, '__file__': '/usr/share/copr/coprs_frontend/coprs/__init__.pyc', '__name__': 'coprs', '__package__': 'coprs', '__path__': ['/usr/share/copr/coprs_frontend/coprs'], 'admin_general': <module 'coprs.views.admin_ns.admin_general' from '/usr/share/copr/coprs_frontend/coprs/views/admin_ns/admin_general.pyc'>, 'admin_ns': <module 'coprs.views.admin_ns' from '/usr/share/copr/coprs_frontend/coprs/views/admin_ns/__init__.pyc'>, 'api_general': <module 'coprs.views.api_ns.api_general' from '/usr/share/copr/coprs_frontend/coprs/views/api_ns/api_general.pyc'>, 'api_ns': <module 'coprs.views.api_ns' from '/usr/share/copr/coprs_frontend/coprs/views/api_ns/__init__.pyc'>, 'app': <Flask 'coprs'>, 'backend_general': <module 'coprs.views.backend_ns.backend_general' from '/usr/share/copr/coprs_frontend/coprs/views/backend_ns/backend_general.pyc'>, 'backend_ns': <module 'coprs.views.backend_ns' from '/usr/share/copr/coprs_frontend/coprs/views/backend_ns/__init__.pyc'>, 'config': <module 'coprs.config' from '/usr/share/copr/coprs_frontend/coprs/config.pyc'>, 'constants': <module 'coprs.constants' from '/usr/share/copr/coprs_frontend/coprs/constants.pyc'>, 'context_processors': <module 'coprs.context_processors' from '/usr/share/copr/coprs_frontend/coprs/context_processors.pyc'>, 'coprs': <module 'coprs' from '/usr/share/copr/coprs_frontend/coprs/__init__.pyc'>, 'coprs_builds': <module 'coprs.views.coprs_ns.coprs_builds' from '/usr/share/copr/coprs_frontend/coprs/views/coprs_ns/coprs_builds.pyc'>, 'coprs_chroots': <module 'coprs.views.coprs_ns.coprs_chroots' from '/usr/share/copr/coprs_frontend/coprs/views/coprs_ns/coprs_chroots.pyc'>, 'coprs_general': <module 'coprs.views.coprs_ns.coprs_general' from '/usr/share/copr/coprs_frontend/coprs/views/coprs_ns/coprs_general.pyc'>, 'coprs_ns': <module 'coprs.views.coprs_ns' from '/usr/share/copr/coprs_frontend/coprs/views/coprs_ns/__init__.pyc'>, 'coprs_packages': <module 'coprs.views.coprs_ns.coprs_packages' from '/usr/share/copr/coprs_frontend/coprs/views/coprs_ns/coprs_packages.pyc'>, 'db': <SQLAlchemy engine='postgresql+psycopg2://copr-fe:coprpass@localhost/coprdb'>, 'exceptions': <module 'coprs.exceptions' from '/usr/share/copr/coprs_frontend/coprs/exceptions.pyc'>, 'filters': <module 'coprs.filters' from '/usr/share/copr/coprs_frontend/coprs/filters.pyc'>, 'flask': <module 'flask' from '/usr/lib/python2.7/site-packages/flask/__init__.pyc'>, 'forms': <module 'coprs.forms' from '/usr/share/copr/coprs_frontend/coprs/forms.pyc'>, 'groups_general': <module 'coprs.views.groups_ns.groups_general' from '/usr/share/copr/coprs_frontend/coprs/views/groups_ns/groups_general.pyc'>, 'groups_ns': <flask.blueprints.Blueprint object at 0x433e410>, 'helpers': <module 'coprs.helpers' from '/usr/share/copr/coprs_frontend/coprs/helpers.pyc'>, 'include_banner': <function include_banner at 0x43779b0>, 'inject_fedmenu': <function inject_fedmenu at 0x43790c8>, 'log': <module 'coprs.log' from '/usr/share/copr/coprs_frontend/coprs/log.pyc'>, 'logic': <module 'coprs.logic' from '/usr/share/copr/coprs_frontend/coprs/logic/__init__.pyc'>, 'misc': <module 'coprs.views.misc' from '/usr/share/copr/coprs_frontend/coprs/views/misc.pyc'>, 'models': <module 'coprs.models' from '/usr/share/copr/coprs_frontend/coprs/models.pyc'>, 'models_committed': <blinker.base.NamedSignal object at 0x33ea6d0; 'models-committed'>, 'oid': <flask_openid.OpenID object at 0x3abb810>, 'os': <module 'os' from '/usr/lib64/python2.7/os.pyc'>, 'pprint': <function pprint at 0x1ebded8>, 'rcp': <coprs.helpers.RedisConnectionProvider object at 0x3e9acd0>, 'recent_general': <module 'coprs.views.recent_ns.recent_general' from '/usr/share/copr/coprs_frontend/coprs/views/recent_ns/recent_general.pyc'>, 'recent_ns': <module 'coprs.views.recent_ns' from '/usr/share/copr/coprs_frontend/coprs/views/recent_ns/__init__.pyc'>, 'redis_session': <module 'coprs.redis_session' from '/usr/share/copr/coprs_frontend/coprs/redis_session.pyc'>, 'register_api_error_handler': <function register_api_error_handler at 0x45c75f0>, 'rest_api': <module 'coprs.rest_api' from '/usr/share/copr/coprs_frontend/coprs/rest_api/__init__.pyc'>, 'rest_api_bp': <flask.blueprints.Blueprint object at 0x45c3190>, 'rmodels': <module 'coprs.rmodels' from '/usr/share/copr/coprs_frontend/coprs/rmodels.pyc'>, 'setup_log': <function setup_log at 0x3cad848>, 'stats_receiver': <module 'coprs.views.stats_ns.stats_receiver' from '/usr/share/copr/coprs_frontend/coprs/views/stats_ns/stats_receiver.pyc'>, 'status_general': <module 'coprs.views.status_ns.status_general' from '/usr/share/copr/coprs_frontend/coprs/views/status_ns/status_general.pyc'>, 'status_ns': <module 'coprs.views.status_ns' from '/usr/share/copr/coprs_frontend/coprs/views/status_ns/__init__.pyc'>, 'tmp_general': <module 'coprs.views.tmp_ns.tmp_general' from '/usr/share/copr/coprs_frontend/coprs/views/tmp_ns/tmp_general.pyc'>, 'tmp_ns': <module 'coprs.views.tmp_ns' from '/usr/share/copr/coprs_frontend/coprs/views/tmp_ns/__init__.pyc'>, 'views': <module 'coprs.views' from '/usr/share/copr/coprs_frontend/coprs/views/__init__.pyc'>, 'webhooks_general': <module 'coprs.views.webhooks_ns.webhooks_general' from '/usr/share/copr/coprs_frontend/coprs/views/webhooks_ns/webhooks_general.pyc'>, 'webhooks_ns': <flask.blueprints.Blueprint object at 0x4374bd0>, 'whooshee': <flask_whooshee.Whooshee object at 0x3abbd90>, 'whoosheers': <module 'coprs.whoosheers' from '/usr/share/copr/coprs_frontend/coprs/whoosheers.pyc'>, 'with_statement': _Feature((2, 5, 0, 'alpha', 1), (2, 6, 0, 'alpha', 0), 32768)} INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. INFO [alembic.runtime.migration] Running downgrade 414a86b37a0f -> 38f205566f20, add unique constraint on (copr_id, name) in package table Traceback (most recent call last): File "/usr/bin/alembic", line 9, in <module> load_entry_point('alembic==0.8.7', 'console_scripts', 'alembic')() File "/usr/lib/python2.7/site-packages/alembic/config.py", line 479, in main CommandLine(prog=prog).main(argv=argv) File "/usr/lib/python2.7/site-packages/alembic/config.py", line 473, in main self.run_cmd(cfg, options) File "/usr/lib/python2.7/site-packages/alembic/config.py", line 456, in run_cmd **dict((k, getattr(options, k)) for k in kwarg) File "/usr/lib/python2.7/site-packages/alembic/command.py", line 202, in downgrade script.run_env() File "/usr/lib/python2.7/site-packages/alembic/script/base.py", line 407, in run_env util.load_python_file(self.dir, 'env.py') File "/usr/lib/python2.7/site-packages/alembic/util/pyfiles.py", line 93, in load_python_file module = load_module_py(module_id, path) File "/usr/lib/python2.7/site-packages/alembic/util/compat.py", line 79, in load_module_py mod = imp.load_source(module_id, path, fp) File "alembic/env.py", line 73, in <module> run_migrations_online() File "alembic/env.py", line 66, in run_migrations_online context.run_migrations() File "<string>", line 8, in run_migrations File "/usr/lib/python2.7/site-packages/alembic/runtime/environment.py", line 797, in run_migrations self.get_context().run_migrations(**kw) File "/usr/lib/python2.7/site-packages/alembic/runtime/migration.py", line 312, in run_migrations step.migration_fn(**kw) File "/usr/share/copr/coprs_frontend/alembic/versions/414a86b37a0f_add_unique_constraint_on_copr_id_name_.py", line 22, in downgrade op.drop_constraint("packages_copr_pkgname", "package") File "<string>", line 8, in drop_constraint File "<string>", line 3, in drop_constraint File "/usr/lib/python2.7/site-packages/alembic/operations/ops.py", line 145, in drop_constraint return operations.invoke(op) File "/usr/lib/python2.7/site-packages/alembic/operations/base.py", line 318, in invoke return fn(self, operation) File "/usr/lib/python2.7/site-packages/alembic/operations/toimpl.py", line 146, in drop_constraint schema=operation.schema, File "/usr/lib/python2.7/site-packages/alembic/ddl/impl.py", line 183, in drop_constraint self._exec(schema.DropConstraint(const)) File "/usr/lib/python2.7/site-packages/alembic/ddl/impl.py", line 118, in _exec return conn.execute(construct, *multiparams, **params) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute return meth(self, multiparams, params) File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/ddl.py", line 68, in _execute_on_connection return connection._execute_ddl(self, multiparams, params) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 968, in _execute_ddl compiled File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context context) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception exc_info File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause reraise(type(exception), exception, tb=exc_tb) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context context) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) constraint "packages_copr_pkgname" of relation "package" does not exist [SQL: 'ALTER TABLE package DROP CONSTRAINT packages_copr_pkgname']
----- Original meddelelse ----- Fra: "Michal Novotny" clime@redhat.com Til: "copr-devel" copr-devel@lists.fedorahosted.org Sendt: onsdag, 16. november 2016 17:00:47 Emne: | Re: missing status_to_order function
sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) constraint "packages_copr_pkgname" of relation "package" does not exist
How old sources do you have? This has been fixed in https://pagure.io/copr/copr/c/e47e6cd41c3e72f58a38a0f25b95b1e5c92b19de?branc... .
Please upgrade to the latest sources (or downgrade to the latest stable release copr-frontend-1.103-1 :)) and setup your db from scratch (dropdb coprdb; createdb coprdb; ./manage.py create_db --alembic alembic.ini) and then run alembic downgrade ... and alembic upgrade head.
clime
_______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org
On Wednesday, November 16, 2016 4:06:46 PM CET Michal Novotny wrote:
You need to run:
[skip] alembic downgrade 3ec22e1db75a [skip] alembic upgrade head
"./manage.py create_db --alembic alembic.ini" installation instruction from copr-setup.txt is creating db according to COPR flask models but this db function is defined purely in alembic revisions. In the next release, this will be fixed.
I'm just interested in fixing this, what's the expected change in next-next-release, and what's the ETA for next-release? Maybe I could help to have it fixed for next-release?
Pavel
On Tuesday, November 22, 2016 2:05:01 PM CET Pavel Raiskup wrote:
Maybe I could help to have it fixed for next-release?
I've pushed this commit: https://pagure.io/copr/copr/c/e084d2826723b27
When running 'manage.py create_db', the database seems to be OK WRT status_to_order and order_to_status -- that was quick fix, so if there's a better approach, we can have a look later. HTH.
Pavel
copr-devel@lists.fedorahosted.org