I don't know what your scenario is that you want to have your own Copr, however, disabling package signing could temporarily solve your problem. Set do_sign=false in the copr_backend-build_1 container in the /etc/copr/copr-be.conf file.
Silvie
On Wednesday, January 5, 2022 1:03:51 AM CET Sérgio Basto wrote:On Tue, 2022-01-04 at 22:58 +0000, Sérgio Basto wrote:On Tue, 2022-01-04 at 10:35 +0100, Silvie Chlupova wrote:Hi Sérgio, I can reproduce your problem by deleting the database in the copr_database_1 container and then running init-database.sh in the frontend container. You are missing the relations in copr_database_1. You can download the database dump here https://copr.fedorainfracloud.org/db_dumps/. Copy the extracted db dump into copr_database_1 and run psql coprdb < your_dump. Or try to delete the docker containers and images and then run docker-compose up -d once again. After successful completion, the relations in copr_database_1 should be created, and after running init-database.sh, it should show text that some of the chroots that the script is trying to create already exist.wget -4 https://copr.fedorainfracloud.org/db_dumps/copr_db-2022-01-04_03-36.gz zcat copr_db-2022-01-04_03-36.gz | docker exec -i copr_database_1 psql coprdb (the technique is use exec -i and not exec -it) now I have the all database of copr production but I want a clean Database and configure my builders ( which is only one x86_64 ) I can't get rid of SQL: INSERT INTO dist_git_instance (name, clone_url, clone_package_uri, priority, default_namespace) VALUES (%(name)s, %(clone_url)s, %(clone_package_uri)s, %(priority)s, %(default_namespace)s) RETURNING dist_git_instance.id] [parameters: {'name': 'fedora', 'clone_url': 'https://src.fedoraproject.or where this is defined this insert ? or I make it to ignore it ? where is defined the schema of database ?From the backups give me by Silvie, I could extract the database schema , I drop all and just create the database schema with empty tables, I ran [2] without errors and things seems ready (after add the repos with [3]) But now build 00000001 failed with a sign problem [1] , any tip ? [1] [2022-01-04 23:45:00,757][ INFO][PID:10] Calling '/bin/sign -u sergiomb#first_one@copr.fedorahosted.org -p' (attempt #1) [2022-01-04 23:45:01,362][ INFO][PID:10] Calling '/bin/sign -u sergiomb#first_one@copr.fedorahosted.org -r /var/lib/copr/public_html/results/sergiomb/first_one/srpm- builds/00000001/mlt-6.26.1-2.fc35.src.rpm' (attempt #1) [2022-01-04 23:45:02,026][ ERROR][PID:10] failed to sign rpm: /var/lib/copr/public_html/results/sergiomb/first_one/srpm- builds/00000001/mlt-6.26.1-2.fc35.src.rpm (in /usr/lib/python3.10/site- packages/copr_backend/sign.py:88) [2022-01-04 23:45:02,028][ INFO][PID:10] Finished build: id=1 failed=True timeout=3600 destdir=/var/lib/copr/public_html/results/sergiomb/first_one chroot=srpm-builds [2022-01-04 23:45:02,031][ ERROR][PID:10] Copr GPG signing problems: Rpm sign failed, affected rpms: ['/var/lib/copr/public_html/results/sergiomb/first_one/srpm- builds/00000001/mlt-6.26.1-2.fc35.src.rpm']Not easy to tell. Please try to check the logs in the keygen container, and perhaps run the `sign` commands manually. Pavel[2] cd /usr/share/copr/coprs_frontend/ && copr-frontend create-db --alembic alembic.ini [2022-01-04 23:37:07,318] INFO in log: logging configuration finished INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. INFO [alembic.runtime.migration] Running stamp_revision -> 55d1e8962a93 [3] copr-frontend create-chroot $(ls /etc/mock/fedora-*-{i386,x86_64}.cfg |xargs -I{} -n1 basename {} .cfg) copr-frontend create-chroot $(ls /etc/mock/epel-*-x86_64.cfg |xargs - I{} -n1 basename {} .cfg)Thank youSilvie On 1/4/22 00:03, Sérgio Basto wrote:Hi, I started to build my own copr , I follow the http://frostyx.cz/posts/copr-docker-compose-without-supervisord but can't pass the init-database.sh [1], I'm using https://pagure.io/copr/copr.git 30 dec 2021 commit (f18faf4f) any tip ? [1] docker exec -it copr_frontend_1 bash cd /usr/share/copr/coprs_frontend/ && copr-frontend create-db -- alembic alembic.ini [2022-01-03 23:01:38,665] INFO in log: logging configuration finished /usr/share/copr/coprs_frontend/coprs/models.py:2445: SAWarning: relationship 'Build.package' will copy column package.id to column build.package_id, whichconflicts with relationship(s): 'Package.builds' (copies package.id to build.package_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read- only. For the less common case that foreign keyconstraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards. To silence this warning, add the parameter 'overlaps="builds"' to the 'Build.package' relationship. (Background on this error at: https://sqlalche.me/e/14/qzyx) db.session.add(DistGitInstance( Traceback (most recent call last): File "/usr/lib64/python3.10/site- packages/sqlalchemy/engine/base.py", line 1802, in _execute_context self.dialect.do_execute( File "/usr/lib64/python3.10/site- packages/sqlalchemy/engine/default.py", line 732, in do_execute cursor.execute(statement, parameters) psycopg2.errors.UndefinedTable: relation "dist_git_instance" does not exist LINE 1: INSERT INTO dist_git_instance (name, clone_url, clone_packag... ^ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/bin/copr-frontend", line 125, in <module> app.cli() File "/usr/lib/python3.10/site-packages/click/core.py", line 1137, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python3.10/site-packages/click/core.py", line 1062, in main rv = self.invoke(ctx) File "/usr/lib/python3.10/site-packages/click/core.py", line 1668, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3.10/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3.10/site-packages/click/core.py", line 763, in invoke return __callback(*args, **kwargs) File "/usr/bin/copr-frontend", line 99, in wrapper sys.exit(bool(function(*args, **kwargs))) File "/usr/share/copr/coprs_frontend/commands/create_db.py", line 18, in create_db db.create_all() File "/usr/lib/python3.10/site- packages/flask_sqlalchemy/__init__.py", line 1094, in create_all self._execute_for_all_tables(app, bind, 'create_all') File "/usr/lib/python3.10/site- packages/flask_sqlalchemy/__init__.py", line 1086, in _execute_for_all_tables op(bind=self.get_engine(app, bind), **extra) File "/usr/lib64/python3.10/site- packages/sqlalchemy/sql/schema.py", line 4785, in create_all bind._run_ddl_visitor( File "/usr/lib64/python3.10/site- packages/sqlalchemy/engine/base.py", line 3117, in _run_ddl_visitor conn._run_ddl_visitor(visitorcallable, element, **kwargs) File "/usr/lib64/python3.10/site- packages/sqlalchemy/engine/base.py", line 2113, in _run_ddl_visitor visitorcallable(self.dialect, self, **kwargs).traverse_single(element) File "/usr/lib64/python3.10/site- packages/sqlalchemy/sql/visitors.py", line 524, in traverse_single return meth(obj, **kw) File "/usr/lib64/python3.10/site-packages/sqlalchemy/sql/ddl.py", line 849, in visit_metadata self.traverse_single( File "/usr/lib64/python3.10/site- packages/sqlalchemy/sql/visitors.py", line 524, in traverse_single return meth(obj, **kw) File "/usr/lib64/python3.10/site-packages/sqlalchemy/sql/ddl.py", line 915, in visit_table table.dispatch.after_create( File "/usr/lib64/python3.10/site- packages/sqlalchemy/event/attr.py", line 343, in __call__ fn(*args, **kw) File "/usr/share/copr/coprs_frontend/coprs/models.py", line 2451, in insert_fedora_distgit db.session.commit() File "<string>", line 2, in commit File "/usr/lib64/python3.10/site- packages/sqlalchemy/orm/session.py", line 1431, in commit self._transaction.commit(_to_root=self.future) File "/usr/lib64/python3.10/site- packages/sqlalchemy/orm/session.py", line 829, in commit self._prepare_impl() File "/usr/lib64/python3.10/site- packages/sqlalchemy/orm/session.py", line 808, in _prepare_impl self.session.flush() File "/usr/lib64/python3.10/site- packages/sqlalchemy/orm/session.py", line 3363, in flush self._flush(objects) File "/usr/lib64/python3.10/site- packages/sqlalchemy/orm/session.py", line 3502, in _flush with util.safe_reraise(): File "/usr/lib64/python3.10/site- packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__ compat.raise_( File "/usr/lib64/python3.10/site- packages/sqlalchemy/util/compat.py", line 207, in raise_ raise exception File "/usr/lib64/python3.10/site- packages/sqlalchemy/orm/session.py", line 3463, in _flush flush_context.execute() File "/usr/lib64/python3.10/site- packages/sqlalchemy/orm/unitofwork.py", line 456, in execute rec.execute(self) File "/usr/lib64/python3.10/site- packages/sqlalchemy/orm/unitofwork.py", line 630, in execute util.preloaded.orm_persistence.save_obj( File "/usr/lib64/python3.10/site- packages/sqlalchemy/orm/persistence.py", line 244, in save_obj _emit_insert_statements( File "/usr/lib64/python3.10/site- packages/sqlalchemy/orm/persistence.py", line 1221, in _emit_insert_statements result = connection._execute_20( File "/usr/lib64/python3.10/site- packages/sqlalchemy/engine/base.py", line 1614, in _execute_20 return meth(self, args_10style, kwargs_10style, execution_options) File "/usr/lib64/python3.10/site- packages/sqlalchemy/sql/elements.py", line 325, in _execute_on_connection return connection._execute_clauseelement( File "/usr/lib64/python3.10/site- packages/sqlalchemy/engine/base.py", line 1481, in _execute_clauseelement ret = self._execute_context( File "/usr/lib64/python3.10/site- packages/sqlalchemy/engine/base.py", line 1845, in _execute_context self._handle_dbapi_exception( File "/usr/lib64/python3.10/site- packages/sqlalchemy/engine/base.py", line 2026, in _handle_dbapi_exception util.raise_( File "/usr/lib64/python3.10/site- packages/sqlalchemy/util/compat.py", line 207, in raise_ raise exception File "/usr/lib64/python3.10/site- packages/sqlalchemy/engine/base.py", line 1802, in _execute_context self.dialect.do_execute( File "/usr/lib64/python3.10/site- packages/sqlalchemy/engine/default.py", line 732, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "dist_git_instance" does not exist LINE 1: INSERT INTO dist_git_instance (name, clone_url, clone_packag... ^_______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/copr-devel@lists.fedorahosted.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure-- Sérgio M. B. _______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/copr-devel@lists.fedorahosted.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure_______________________________________________ copr-devel mailing list -- copr-devel@lists.fedorahosted.org To unsubscribe send an email to copr-devel-leave@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/copr-devel@lists.fedorahosted.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure