#2839 koji-sweep-db script don't read all config files in contrast to the hub module itself.
Closed: Fixed 2 years ago by tkopecek. Opened 2 years ago by frank-mdc.

The hub module itself will also read the files under /etc/koji-hub/hub.conf.d, so the password and the host name for the database can be splited out into in extra file. But koji-sweep-db will only read the main file /etc/koji-hub/hub.conf


As an dirty work around:
...
if opts['DBHost'] is None:
opts['DBHost'] = opts['DBhost']

// Fix start
config_helper = RawConfigParser()
config_helper.read("/etc/koji-hub/hub.conf.d/db.conf")
opts["DBHost"] = config_helper["hub"]["DBHost"]
opts["DBPass"] = config_helper["hub"]["DBPass"]
// Fix end

koji.db.provideDBopts(database=opts["DBName"],
...

Metadata Update from @tkopecek:
- Custom field Size adjusted to None
- Issue set to the milestone: 1.26

2 years ago

Metadata Update from @jcupova:
- Issue tagged with: testing-ready

2 years ago

Metadata Update from @jobrauer:
- Issue tagged with: testing-done

2 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #2887 Merged 2 years ago