Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dmick
Copy link
Member

@dmick dmick commented Apr 17, 2025

Just a bunch of little things, mostly, except for the decision to remove the hot-standby server (because the
newer postgresql configuration is completely different, and I don't think it was ever necessary for performance
or fault-tolerance).

I've run this on a new server installed with Ubuntu Noble, and transferred the data from 1.shaman.ceph.com with pg_dumpall -> pg_restore -> psql:

1.shaman:
pg_dumpall -c --quote-all-identifiers -f dumpall.sql
(copy dumpall.sql to new server)
1.new:
dropdb shaman
pg_restore -c -C -f restore.sql dumpall.sql
psql < restore.sql

The new server provides a working web UI, and I validated the newest fix from #147 as follows:

  1. create a project 'dmick'

  2. create 1.json:

{
  "url": "url1",
  "status": "ready",
  "distro": "distro1",
  "distrover": "distrover1",
  "distro_arch": "distroarch1",
  "ref": "ref1",
  "sha1": "sha1_1",
  "flavor": "default",
  "extra": {
    "version": "ver1",
    "job_name": "dmick-synthetic"
  }
}
curl -v -X POST -H "Content-Type: application/json" -d @1.json -u "admin:****" 'https://1.shaman.new.ceph.com/api/builds/dmick/'
  1. change distro_arch to 'distroarch2' and post again as above:
$ diff 1.json 2.json
6c6
<   "distro_arch": "distroarch1",
---
>   "distro_arch": "distroarch2",
  1. verify with psql that both build records exist, differing only in distro_arch value

I should be able to schedule some downtime, bring 1.shaman and 2.shaman's service down, take a last dumpall of the DB and load it into the new server, then twiddle the server IPs to have the new server take over at 1.shaman (to avoid DNS-TTL-timeout delays for all consumers) in fairly short order.

dmick added 12 commits April 17, 2025 15:33
not sure when this changed, but it seems like long ago

Signed-off-by: Dan Mick <[email protected]>
as of v14, pg_stats is no more

Signed-off-by: Dan Mick <[email protected]>
pip can't handle --hash and -e . at the same time

see all the lovely dissent at pypa/pip#4995

include update of psycopg2 to .10 micro version

Signed-off-by: Dan Mick <[email protected]>
When updating the hosts, the differences between configuring
hot-standby on postgresql 9.5 -> 16 are just too great.
I think the hot-standby feature was of questionable value
anyway, and it super-complicates the update procedure, and
shaman is due for some major architectural changes soon
anyway.

If this horribly affects performance we can circle back,
but I very much doubt it will.

Signed-off-by: Dan Mick <[email protected]>
@dmick dmick changed the title Update ansible for instllation with py3.12 and Ubuntu Noble and postgresql 16 Update ansible for installation with py3.12 and Ubuntu Noble and postgresql 16 Apr 17, 2025
@dmick dmick requested review from djgalloway and zmc April 17, 2025 22:45
@djgalloway
Copy link
Contributor

So there is no second/backup shaman server anymore?

@dmick
Copy link
Member Author

dmick commented Apr 21, 2025

So there is no second/backup shaman server anymore?

Right. My judgement was that it was not worth the effort to recast/retest given how much the configuration has changed and how little I understood the management procedures. I need to circle back on the load balancer deployment ansible code too

Copy link
Member

@zmc zmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sane to me!

@@ -1,4 +0,0 @@
# {{ ansible_managed }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was this file even supposed to be for?

Copy link
Member Author

@dmick dmick Apr 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was part of the hot-standby configuration that I excised. it's not present anymore; those settings got absorbed into postgresql.conf

@djgalloway djgalloway merged commit 29521ca into main Apr 21, 2025
4 checks passed
@djgalloway djgalloway deleted the update-ansible-plays branch April 21, 2025 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants