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 1/5/22 09:01, Pavel Raiskup wrote: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 thecopr_database_1 container and then running init-database.sh in thefrontend container. You are missing the relations in copr_database_1.You can download the database dump herehttps://copr.fedorainfracloud.org/db_dumps/. Copy the extracted dbdumpinto copr_database_1 and run psql coprdb < your_dump. Or try todeletethe docker containers and images and then run docker-compose up -donceagain. After successful completion, the relations in copr_database_1should be created, and after running init-database.sh, it should showtext that some of the chroots that the script is trying to createalready exist.wget -4https://copr.fedorainfracloud.org/db_dumps/copr_db-2022-01-04_03-36.gzzcat copr_db-2022-01-04_03-36.gz | docker exec -i copr_database_1 psqlcoprdb (the technique is use exec -i and not exec -it)now I have the all database of copr production but I want a cleanDatabase 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.orwhere this is defined this insert ? or I make it to ignore it ? whereis 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, Iran [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 -usergiomb#first_one@copr.fedorahosted.org -p' (attempt #1)[2022-01-04 23:45:01,362][ INFO][PID:10] Calling '/bin/sign -usergiomb#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=1failed=True timeout=3600destdir=/var/lib/copr/public_html/results/sergiomb/first_onechroot=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 --alembicalembic.ini[2022-01-04 23:37:07,318] INFO in log: logging configuration finishedINFO [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 youSilvieOn 1/4/22 00:03, Sérgio Basto wrote:Hi,I started to build my own copr , I followthe http://frostyx.cz/posts/copr-docker-compose-without-supervisordbut can't pass the init-database.sh [1], I'm usinghttps://pagure.io/copr/copr.git 30 dec 2021 commit (f18faf4f)any tip ?[1]docker exec -it copr_frontend_1 bashcd /usr/share/copr/coprs_frontend/ && copr-frontend create-db --alembicalembic.ini[2022-01-03 23:01:38,665] INFO in log: logging configurationfinished/usr/share/copr/coprs_frontend/coprs/models.py:2445: SAWarning:relationship 'Build.package' will copy column package.id to columnbuild.package_id, whichconflicts with relationship(s):'Package.builds'(copies package.id to build.package_id). If this is not theintention,consider if these relationships should be linked withback_populates,or if viewonly=True should be applied to one or more if they areread-only. For the less common case that foreign keyconstraints arepartially overlapping, the orm.foreign() annotation can be used toisolate the columns that should be written towards. To silencethiswarning, 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_contextself.dialect.do_execute(File "/usr/lib64/python3.10/site-packages/sqlalchemy/engine/default.py", line 732, in do_executecursor.execute(statement, parameters)psycopg2.errors.UndefinedTable: relation "dist_git_instance" doesnotexistLINE 1: INSERT INTO dist_git_instance (name, clone_url,clone_packag...^The above exception was the direct cause of the followingexception: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,inmainrv = self.invoke(ctx)File "/usr/lib/python3.10/site-packages/click/core.py", line 1668,ininvokereturn _process_result(sub_ctx.command.invoke(sub_ctx))File "/usr/lib/python3.10/site-packages/click/core.py", line 1404,ininvokereturn ctx.invoke(self.callback, **ctx.params)File "/usr/lib/python3.10/site-packages/click/core.py", line 763,ininvokereturn __callback(*args, **kwargs)File "/usr/bin/copr-frontend", line 99, in wrappersys.exit(bool(function(*args, **kwargs)))File "/usr/share/copr/coprs_frontend/commands/create_db.py", line18,in create_dbdb.create_all()File "/usr/lib/python3.10/site-packages/flask_sqlalchemy/__init__.py",line 1094, in create_allself._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_tablesop(bind=self.get_engine(app, bind), **extra)File "/usr/lib64/python3.10/site-packages/sqlalchemy/sql/schema.py",line 4785, in create_allbind._run_ddl_visitor(File "/usr/lib64/python3.10/site-packages/sqlalchemy/engine/base.py",line 3117, in _run_ddl_visitorconn._run_ddl_visitor(visitorcallable, element, **kwargs)File "/usr/lib64/python3.10/site-packages/sqlalchemy/engine/base.py",line 2113, in _run_ddl_visitorvisitorcallable(self.dialect, self,**kwargs).traverse_single(element)File "/usr/lib64/python3.10/site-packages/sqlalchemy/sql/visitors.py",line 524, in traverse_singlereturn meth(obj, **kw)File "/usr/lib64/python3.10/site-packages/sqlalchemy/sql/ddl.py",line849, in visit_metadataself.traverse_single(File "/usr/lib64/python3.10/site-packages/sqlalchemy/sql/visitors.py",line 524, in traverse_singlereturn meth(obj, **kw)File "/usr/lib64/python3.10/site-packages/sqlalchemy/sql/ddl.py",line915, in visit_tabletable.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,ininsert_fedora_distgitdb.session.commit()File "<string>", line 2, in commitFile "/usr/lib64/python3.10/site-packages/sqlalchemy/orm/session.py",line 1431, in commitself._transaction.commit(_to_root=self.future)File "/usr/lib64/python3.10/site-packages/sqlalchemy/orm/session.py",line 829, in commitself._prepare_impl()File "/usr/lib64/python3.10/site-packages/sqlalchemy/orm/session.py",line 808, in _prepare_implself.session.flush()File "/usr/lib64/python3.10/site-packages/sqlalchemy/orm/session.py",line 3363, in flushself._flush(objects)File "/usr/lib64/python3.10/site-packages/sqlalchemy/orm/session.py",line 3502, in _flushwith 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 exceptionFile "/usr/lib64/python3.10/site-packages/sqlalchemy/orm/session.py",line 3463, in _flushflush_context.execute()File "/usr/lib64/python3.10/site-packages/sqlalchemy/orm/unitofwork.py", line 456, in executerec.execute(self)File "/usr/lib64/python3.10/site-packages/sqlalchemy/orm/unitofwork.py", line 630, in executeutil.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_statementsresult = connection._execute_20(File "/usr/lib64/python3.10/site-packages/sqlalchemy/engine/base.py",line 1614, in _execute_20return meth(self, args_10style, kwargs_10style, execution_options)File "/usr/lib64/python3.10/site-packages/sqlalchemy/sql/elements.py",line 325, in _execute_on_connectionreturn connection._execute_clauseelement(File "/usr/lib64/python3.10/site-packages/sqlalchemy/engine/base.py",line 1481, in _execute_clauseelementret = self._execute_context(File "/usr/lib64/python3.10/site-packages/sqlalchemy/engine/base.py",line 1845, in _execute_contextself._handle_dbapi_exception(File "/usr/lib64/python3.10/site-packages/sqlalchemy/engine/base.py",line 2026, in _handle_dbapi_exceptionutil.raise_(File "/usr/lib64/python3.10/site-packages/sqlalchemy/util/compat.py",line 207, in raise_raise exceptionFile "/usr/lib64/python3.10/site-packages/sqlalchemy/engine/base.py",line 1802, in _execute_contextself.dialect.do_execute(File "/usr/lib64/python3.10/site-packages/sqlalchemy/engine/default.py", line 732, in do_executecursor.execute(statement, parameters)sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable)relation "dist_git_instance" does not existLINE 1: INSERT INTO dist_git_instance (name, clone_url,clone_packag...^_______________________________________________copr-devel mailing list -- copr-devel@lists.fedorahosted.orgTo unsubscribe send an email tocopr-devel-leave@lists.fedorahosted.orgFedora Code of Conduct:https://docs.fedoraproject.org/en-US/project/code-of-conduct/List Guidelines:https://fedoraproject.org/wiki/Mailing_list_guidelinesList Archives:https://lists.fedorahosted.org/archives/list/copr-devel@lists.fedorahosted.orgDo not reply to spam on the list, report it:https://pagure.io/fedora-infrastructure
--
Sérgio M. B.