[Bug 2076432] [NEW] [SRU] add debian/patches/install-missing-files.patch from upstream

Launchpad Bug Tracker 2076432 at bugs.launchpad.net
Fri Sep 6 08:02:24 UTC 2024


You have been subscribed to a public bug by David Negreira (dnegreira):

[ Impact ]

 * Currently one is unable to create the rally database with the command 'rally db create' as it will output the following error:
   # rally db create
Creating database: sqlite:////tmp/rally.sqlite
Command failed, please check log for more info
2024-09-06 07:49:41.246 7972 CRITICAL rally [-] Unhandled error: alembic.util.exc.CommandError: No config file '/usr/lib/python3/dist-packages/rally/common/db/alembic.ini' found, or file has no '[alembic]' section
2024-09-06 07:49:41.246 7972 ERROR rally Traceback (most recent call last):
2024-09-06 07:49:41.246 7972 ERROR rally   File "/usr/bin/rally", line 10, in <module>
2024-09-06 07:49:41.246 7972 ERROR rally     sys.exit(main())
2024-09-06 07:49:41.246 7972 ERROR rally   File "/usr/lib/python3/dist-packages/rally/cli/main.py", line 40, in main
2024-09-06 07:49:41.246 7972 ERROR rally     return cliutils.run(sys.argv, categories)
2024-09-06 07:49:41.246 7972 ERROR rally   File "/usr/lib/python3/dist-packages/rally/cli/cliutils.py", line 669, in run
2024-09-06 07:49:41.246 7972 ERROR rally     ret = fn(*fn_args, **fn_kwargs)
2024-09-06 07:49:41.246 7972 ERROR rally   File "/usr/lib/python3/dist-packages/rally/cli/commands/db.py", line 44, in create
2024-09-06 07:49:41.246 7972 ERROR rally     db.schema.schema_create()
2024-09-06 07:49:41.246 7972 ERROR rally   File "/usr/lib/python3/dist-packages/rally/common/db/schema.py", line 139, in schema_create
2024-09-06 07:49:41.246 7972 ERROR rally     schema_stamp("head", config=config)
2024-09-06 07:49:41.246 7972 ERROR rally   File "/usr/lib/python3/dist-packages/rally/common/db/schema.py", line 152, in schema_stamp
2024-09-06 07:49:41.246 7972 ERROR rally     return alembic.command.stamp(config, revision)
2024-09-06 07:49:41.246 7972 ERROR rally   File "/usr/lib/python3/dist-packages/alembic/command.py", line 579, in stamp
2024-09-06 07:49:41.246 7972 ERROR rally     script = ScriptDirectory.from_config(config)
2024-09-06 07:49:41.246 7972 ERROR rally   File "/usr/lib/python3/dist-packages/alembic/script/base.py", line 150, in from_config
2024-09-06 07:49:41.246 7972 ERROR rally     script_location = config.get_main_option("script_location")
2024-09-06 07:49:41.246 7972 ERROR rally   File "/usr/lib/python3/dist-packages/alembic/config.py", line 309, in get_main_option
2024-09-06 07:49:41.246 7972 ERROR rally     return self.get_section_option(self.config_ini_section, name, default)
2024-09-06 07:49:41.246 7972 ERROR rally   File "/usr/lib/python3/dist-packages/alembic/config.py", line 282, in get_section_option
2024-09-06 07:49:41.246 7972 ERROR rally     raise util.CommandError(
2024-09-06 07:49:41.246 7972 ERROR rally alembic.util.exc.CommandError: No config file '/usr/lib/python3/dist-packages/rally/common/db/alembic.ini' found, or file has no '[alembic]' section
2024-09-06 07:49:41.246 7972 ERROR rally

 * Currently the rally package in Jammy and previous versions of Ubuntu do not contain the
   necessary migration scripts in rally/common/db/migrations/versions/ to create the database.
 * This SRU aims to backport the same modification made upstream [1] [2] on rally package 3.3.0-2
   which can be seen on the debdiff on the ubuntu source as well [3] [4]

[ Test Plan ]

 * Ensure the files under /usr/lib/python3/dist-packages/rally/common/db/migrations/versions/
   do exist.
 * run the command 'rally db create' and 'rally db upgrade' which should output the following:
   # rally db create                     
     Creating database: sqlite:////tmp/rally.sqlite
     Database created successfully
   # rally db upgrade
     Upgrading database: sqlite:////tmp/rally.SQLite
     Database is already up to date
 * query the database with 'sqlite3 /tmp/rally.sqlite' and run the command '.tables' inside the sqlite3 cli to ensure tables are created.
   # sqlite3 /tmp/rally.sqlite
   SQLite version 3.37.2 2022-01-06 13:25:41
   Enter ".help" for usage hints.
   sqlite> .tables
   alembic_version  subtasks         verifications    workloads      
   envs             tags             verifiers      
   platforms        tasks            workloaddata   

  
[ Where problems could occur ]

 * Since this is just adding static files to the package, and enable a command to run, it does not enable any automation or automatic install, 
   there should be no risks associated with this change.

[1] https://metadata.ftp-master.debian.org/changelogs//main/r/rally/rally_3.3.0-2_changelog
[2] https://sources.debian.org/patches/rally/3.3.0-2/install-missing-files.patch/
[3] https://launchpad.net/ubuntu/+source/rally/3.3.0-2
[4] https://launchpadlibrarian.net/664611856/rally_3.3.0-1_3.3.0-2.diff.gz

** Affects: rally (Ubuntu)
     Importance: Medium
     Assignee: David Negreira (dnegreira)
         Status: Fix Released

** Affects: rally (Ubuntu Jammy)
     Importance: Medium
     Assignee: David Negreira (dnegreira)
         Status: Incomplete


** Tags: patch
-- 
[SRU] add debian/patches/install-missing-files.patch from upstream
https://bugs.launchpad.net/bugs/2076432
You received this bug notification because you are a member of Ubuntu Sponsors, which is subscribed to the bug report.



More information about the Ubuntu-sponsors mailing list