adfinis/pyaptly

bootstrap, cannot create ubuntu/stable publish point missing previous week snapshots

erickeller opened this issue · 2 comments

Currently when setting up the aptly lastest/next-stable/stable system we cannot bootstrap all these publish point at once.

When calling the following commands:

release=bionic
  pyaptly -c /etc/pyaptly/${release}_rlc.yml repo create
  echo "Creating mirror..."
  pyaptly -c /etc/pyaptly/${release}_rlc.yml mirror create
  echo "Updating mirror..."
  pyaptly -c /etc/pyaptly/${release}_rlc.yml mirror update
  echo "Working on: ${release}"
  echo "Creating snapshot..."
  pyaptly -c /etc/pyaptly/${release}_rlc.yml snapshot create
  pyaptly -c /etc/pyaptly/${release}_rlc.yml publish create
  echo "Creating stable snapshot..."
  pyaptly -c /etc/pyaptly/${release}_rlc.yml publish create ubuntu/stable

The configuration looks like

...
      distribution: "bionic"
      origin: "Ubuntu"
      architectures: ["amd64", "i386", "source"]
      components: ["main", "restricted", "universe", "multiverse"]
      snapshots:
        - name: "bionic-main_foo-keyring-stable-%T"
          timestamp: "previous"
          archive-on-update: "archived-bionic-main_foo-keyring-stable-%T"
        - name: "bionic-restricted-stable-%T"
          timestamp: "previous"
          archive-on-update: "archived-bionic-restricted-stable-%T"
        - name: "bionic-universe-stable-%T"
          timestamp: "previous"
          archive-on-update: "archived-bionic-universe-stable-%T"
        - name: "bionic-multiverse-stable-%T"
          timestamp: "previous"
          archive-on-update: "archived-bionic-multiverse-stable-%T"
      automatic-update: false
...
Creating snapshot...
Creating stable snapshot...
ERROR: unable to publish: snapshot with name bionic-main_foo-keyring-stable-20180825T0000Z not found
Traceback (most recent call last):
  File "/usr/local/bin/pyaptly", line 1842, in <module>
    main()
  File "/usr/local/bin/pyaptly", line 803, in main
    args.func(cfg, args)
  File "/usr/local/bin/pyaptly", line 1289, in publish
    cmd.execute()
  File "/usr/local/bin/pyaptly", line 267, in execute
    self._finished = subprocess.check_call(self.cmd)
  File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['aptly', 'publish', '-origin=Ubuntu', '-component=main,restricted,universe,multiverse', '-distribution=bionic', '-architectures=amd64,i386,source', 'snapshot', 'bionic-main_foo-keyring-stable-20180825T0000Z', 'bionic-restricted-stable-20180825T0000Z', 'bionic-universe-stable-20180825T0000Z', 'bionic-multiverse-stable-20180825T0000Z', 'ubuntu/stable']' returned non-zero exit status 1

@erickeller The snippet you posted does not contain the part of the yaml where you define the referenced snapshots. Can you paste that too?

@erickeller closing this for now. we have updated pyaptly for 2024, but haven't changed core logic, so your problem would still exist. Please reopen if needed.