Project

Profile

Help

Issue #2001

closed

Make sure sqlite files are generated if repoview is enabled

Added by ttereshc almost 8 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Master
Platform Release:
2.9.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

It is possible to disable generation of the sqlite files while repoview option will still be enabled.
It will lead to the error during next publish, because repoview requires rpm repository metadata to be in the format of sqlite files.

Actions #1

Updated by ttereshc almost 8 years ago

  • Status changed from ASSIGNED to POST
  • Triaged changed from No to Yes

https://github.com/pulp/pulp_rpm/pull/906

For now the logic is so:
- if you want to set repoview to True and you update yum_distributor via REST API, you have to set generate_sqlite to True as well. No magic for developers.
- if you want to set repoview to True and you update yum_distributor via pulp-admin, we will set generate_sqlite to True silently. Friendly for users.
- If you want to set generate_sqlite to False, you have to disable repoview in any case. This way repoview won't be disabled silently, without any notice.

Actions #2

Updated by mhrivnak almost 8 years ago

There is one edge case that is sub-optimal, but probably this is the best option anyway. Consider that a pulp-admin user creates a new repo. They then:

1. update the repo to enable repoview, which automatically turns on sqlite DB generation
2. try it and decide they don't like it
3. update the repo to disable repoview

They are left with sqlite DB generation still on. When the disable happens, pulp-admin wouldn't know if the user deliberately wants the sqlite DB generation on, or if it was automatically turned on, and should thus be turned back off. I think this edge case is ok to live with, and is probably the best overall user experience. I just wanted to point it out to make sure we're deliberately accepting that behavior.

Added by ttereshc almost 8 years ago

Revision b4a46ef2 | View on GitHub

Make sure sqlite files are generated if repoview is enabled.

closes #2001 https://pulp.plan.io/issues/2001

Actions #3

Updated by ttereshc almost 8 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #4

Updated by ttereshc almost 8 years ago

  • Platform Release set to 2.9.0
Actions #5

Updated by pthomas@redhat.com almost 8 years ago

  • Status changed from MODIFIED to 6

[root@tigger ~]#
[root@tigger ~]# pulp-admin rpm repo list --details --repo-id zoo
--------------------------------------------------------------------
RPM Repositories
--------------------------------------------------------------------

Id: zoo
Display Name: None
Description: None
Content Unit Counts:
Erratum: 4
Package Category: 1
Package Group: 2
Rpm: 32
Notes:
Scratchpad:
Checksum Type: sha256
Importers:
Config:
Download Policy: background
Feed: https://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/z
oo/
Id: yum_importer
Importer Type Id: yum_importer
Last Sync: 2016-07-08T15:40:14Z
Repo Id: zoo
Scratchpad:
Previous Skip List:
Repomd Revision: 1331832478
Distributors:
Auto Publish: True
Config:
Checksum Type: sha256
Http: False
Https: True
Relative URL: repos/pulp/pulp/demo_repos/zoo/
Distributor Type Id: yum_distributor
Id: yum_distributor
Last Override Config:
Last Publish: 2016-07-08T15:40:22Z
Last Updated: 2016-07-08T15:40:22Z
Repo Id: zoo
Scratchpad:
Auto Publish: False
Config:
Http: False
Https: True
Relative URL: repos/pulp/pulp/demo_repos/zoo/
Distributor Type Id: export_distributor
Id: export_distributor
Last Override Config:
Last Publish: None
Last Updated: 2016-07-11T18:29:47Z
Repo Id: zoo
Scratchpad:

[root@tigger ~]# pulp-admin rpm repo update --repo-id zoo --repoview true
This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Task Succeeded

[root@tigger ~]# pulp-admin rpm repo list --details --repo-id zoo
--------------------------------------------------------------------
RPM Repositories
--------------------------------------------------------------------

Id: zoo
Display Name: None
Description: None
Content Unit Counts:
Erratum: 4
Package Category: 1
Package Group: 2
Rpm: 32
Notes:
Scratchpad:
Checksum Type: sha256
Importers:
Config:
Download Policy: background
Feed: https://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/z
oo/
Id: yum_importer
Importer Type Id: yum_importer
Last Sync: 2016-07-08T15:40:14Z
Repo Id: zoo
Scratchpad:
Previous Skip List:
Repomd Revision: 1331832478
Distributors:
Auto Publish: True
Config:
Checksum Type: sha256
Generate Sqlite: True
Http: False
Https: True
Relative URL: repos/pulp/pulp/demo_repos/zoo/
Repoview: True
Distributor Type Id: yum_distributor
Id: yum_distributor
Last Override Config:
Last Publish: 2016-07-08T15:40:22Z
Last Updated: 2016-07-11T20:42:20Z
Repo Id: zoo
Scratchpad:
Auto Publish: False
Config:
Http: False
Https: True
Relative URL: repos/pulp/pulp/demo_repos/zoo/
Distributor Type Id: export_distributor
Id: export_distributor
Last Override Config:
Last Publish: None
Last Updated: 2016-07-11T18:29:47Z
Repo Id: zoo
Scratchpad:

[root@tigger ~]# pulp-admin rpm repo update --repo-id zoo --generate-sqlite false
This command may be exited via ctrl+c without affecting the request.

[\]
Running...
Updating distributor: yum_distributor

Task Failed

Repoview functionality depends on the sqlite files. If you want to enable
`repoview` option, enable `generate_sqlite` as well. If you want to disable
`generate_sqlite` option, disable `repoview` as well.

[root@tigger ~]# pulp-admin rpm repo update --repo-id zoo --generate-sqlite false --repoview false
This command may be exited via ctrl+c without affecting the request.

[\]
Running...
Updating distributor: yum_distributor

Task Succeeded

[\]
Running...
Updating distributor: export_distributor

Task Succeeded

[root@tigger ~]# pulp-admin rpm repo list --details --repo-id zoo+----------------------------------------------------------------------+
RPM Repositories
--------------------------------------------------------------------

Id: zoo
Display Name: None
Description: None
Content Unit Counts:
Erratum: 4
Package Category: 1
Package Group: 2
Rpm: 32
Notes:
Scratchpad:
Checksum Type: sha256
Importers:
Config:
Download Policy: background
Feed: https://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/z
oo/
Id: yum_importer
Importer Type Id: yum_importer
Last Sync: 2016-07-08T15:40:14Z
Repo Id: zoo
Scratchpad:
Previous Skip List:
Repomd Revision: 1331832478
Distributors:
Auto Publish: True
Config:
Checksum Type: sha256
Generate Sqlite: False
Http: False
Https: True
Relative URL: repos/pulp/pulp/demo_repos/zoo/
Repoview: False
Distributor Type Id: yum_distributor
Id: yum_distributor
Last Override Config:
Last Publish: 2016-07-08T15:40:22Z
Last Updated: 2016-07-11T20:45:16Z
Repo Id: zoo
Scratchpad:
Auto Publish: False
Config:
Generate Sqlite: False
Http: False
Https: True
Relative URL: repos/pulp/pulp/demo_repos/zoo/
Distributor Type Id: export_distributor
Id: export_distributor
Last Override Config:
Last Publish: None
Last Updated: 2016-07-11T20:45:16Z
Repo Id: zoo
Scratchpad:

Actions #6

Updated by semyers almost 8 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE
Actions #8

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF