Page MenuHomeSoftware Heritage

staging: vault: Deploy v1.0.0
Closed, MigratedEdits Locked


Deploy latest vault:

  • ensure debian jenkins builds are fine
  • swh.vault
  • swh.web

Cache invalidation is required to avoid migrating the actual model change.
That means truncate the bundle and cleaning up the objstorage.

Event Timeline

ardumont triaged this task as Normal priority.Aug 26 2021, 2:02 PM
ardumont created this task.
ardumont changed the task status from Open to Work in Progress.Aug 26 2021, 2:21 PM
ardumont updated the task description. (Show Details)
ardumont moved this task from Backlog to in-progress on the System administration board.
  • Stop puppet
  • Stop gunicorn-swh-vault
  • Schema migration [1]
  • Clean up the objstorage [2]
  • Start back gunicorn-swh-vault
  • Upgrade staging workers and webapp nodes with latest swh.vault
  • Try a cooking and check result
truncate vault_batch cascade;

drop table vault_bundle cascade;
drop type cook_type;

create type bundle_type as enum ('flat', 'gitfast', 'git_bare');
comment on type bundle_type is 'Type of the requested bundle';

create table vault_bundle (
  id bigserial primary key,

  type bundle_type not null,
  swhid text not null,  -- requested object ID

  task_id integer,  -- scheduler task id
  task_status cook_status not null default 'new',  -- status of the task
  sticky boolean not null default false, -- bundle cannot expire

  ts_created timestamptz not null default now(),  -- timestamp of creation
  ts_done timestamptz,  -- timestamp of the cooking result
  ts_last_access timestamptz not null default now(),  -- last access

  progress_msg text -- progress message
create unique index vault_bundle_type_swhid
  on vault_bundle (type, swhid);
create index vault_bundle_task_id
  on vault_bundle (task_id);

insert into dbversion (version, release, description)
values (4, now(), 'Initial version');


root@vault:~# grep vault_cache /etc/softwareheritage/vault/server.yml
  root: "/srv/softwareheritage/vault_cache"
root@vault:~# rm -rf /srv/softwareheritage/vault_cache
ardumont claimed this task.
ardumont moved this task from deployed/landed/monitoring to done on the System administration board.