Skip to content

Commit 9679313

Browse files
authored
Remove -u _daemon_ from the docs (#1035)
1 parent a7aaea9 commit 9679313

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

docs/explanation/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The snap "charmed-postgresql" also ships list of tools used by charm:
5353
* `charmed-postgresql.pgbackrest` - a tool to backup/restore PostgreSQL DB.
5454

5555
```{warning}
56-
All snap resources must be executed under the special user `snapd_daemon` only!
56+
All snap resources must be executed under the special snap user `_daemon_` only!
5757
```
5858

5959
<a name="integrations"></a>

docs/how-to/switchover-failover.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Find the current primary/standby/replica:
7373

7474
```text
7575
> juju ssh postgresql/0
76-
ubuntu@juju-422c1a-0:~$ sudo -u _daemon_ patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml list
76+
ubuntu@juju-422c1a-0:~$ sudo patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml list
7777
+ Cluster: postgresql (7499430436963402504) ---+-----------+----+-----------+
7878
| Member | Host | Role | State | TL | Lag in MB |
7979
+--------------+----------------+--------------+-----------+----+-----------+

docs/reference/troubleshooting/cli-helpers.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Learn more about Patroni in the [Architecture](/explanation/architecture) page.
2121

2222
The main Patroni tool is `patronictl`.
2323

24-
**It should only be used under the snap context**, via the user `_daemon_`.
24+
**It should only be used under the snap context**, via the root user.
2525

2626
#### Cluster status
2727

@@ -34,7 +34,7 @@ The main Patroni tool is `patronictl`.
3434
> juju ssh postgresql/2
3535
...
3636
37-
ubuntu@juju-b87344-2:~$ sudo -u _daemon_ patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml topology
37+
ubuntu@juju-b87344-2:~$ sudo patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml topology
3838
+ Cluster: postgresql (7496847632512033809) ------+-----------+----+-----------+
3939
| Member | Host | Role | State | TL | Lag in MB |
4040
+-----------------+----------------+--------------+-----------+----+-----------+
@@ -53,7 +53,7 @@ Use `--help` to find all the available Patroni actions.
5353
<details><summary>Example: Patroni actions</summary>
5454

5555
```text
56-
> sudo -u _daemon_ patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml --help
56+
> sudo patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml --help
5757
...
5858
failover Failover to a replica
5959
history Show the history of failovers/switchovers
@@ -78,7 +78,7 @@ Patroni can perform a low-level [switchover/failover](https://patroni.readthedoc
7878
<details><summary>Example: switchover (healthy cluster only)</summary>
7979

8080
```text
81-
ubuntu@juju-b87344-2:~$ sudo -u _daemon_ patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml switchover postgresql --candidate postgresql-2 --force
81+
ubuntu@juju-b87344-2:~$ sudo patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml switchover postgresql --candidate postgresql-2 --force
8282
Current cluster topology
8383
+ Cluster: postgresql (7496847632512033809) ----+-----------+----+-----------+
8484
| Member | Host | Role | State | TL | Lag in MB |
@@ -96,7 +96,7 @@ Current cluster topology
9696
| postgresql-3 | 10.189.210.26 | Replica | stopped | | unknown |
9797
+---------------+----------------+---------+-----------+----+-----------+
9898
99-
ubuntu@juju-b87344-2:~$ sudo -u _daemon_ patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml list
99+
ubuntu@juju-b87344-2:~$ sudo patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml list
100100
+ Cluster: postgresql (7496847632512033809) ----+-----------+----+-----------+
101101
| Member | Host | Role | State | TL | Lag in MB |
102102
+---------------+----------------+--------------+-----------+----+-----------+
@@ -110,7 +110,7 @@ ubuntu@juju-b87344-2:~$ sudo -u _daemon_ patronictl -c /var/snap/charmed-postgre
110110
<details><summary>Example: failover</summary>
111111

112112
```text
113-
ubuntu@juju-b87344-2:~$ sudo -u _daemon_ patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml failover postgresql --candidate postgresql-3
113+
ubuntu@juju-b87344-2:~$ sudo patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml failover postgresql --candidate postgresql-3
114114
Current cluster list
115115
+ Cluster: postgresql (7496847632512033809) ----+-----------+----+-----------+
116116
| Member | Host | Role | State | TL | Lag in MB |
@@ -129,14 +129,14 @@ Are you sure you want to failover cluster postgresql, demoting current leader po
129129
| postgresql-3 | 10.189.210.26 | Leader | running | 1 | |
130130
+---------------+----------------+---------+---------+----+-----------+
131131
132-
ubuntu@juju-b87344-2:~$ sudo -u _daemon_ patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml history
132+
ubuntu@juju-b87344-2:~$ sudo patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml history
133133
+----+-----------+------------------------------+----------------------------------+--------------+
134134
| TL | LSN | Reason | Timestamp | New Leader |
135135
+----+-----------+------------------------------+----------------------------------+--------------+
136136
| 1 | 335544480 | no recovery target specified | 2025-04-25T04:44:53.137152+00:00 | postgresql-3 |
137137
+----+-----------+------------------------------+----------------------------------+--------------+
138138
139-
ubuntu@juju-b87344-2:~$ sudo -u _daemon_ patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml list
139+
ubuntu@juju-b87344-2:~$ sudo patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml list
140140
+ Cluster: postgresql (7496847632512033809) ----+-----------+----+-----------+
141141
| Member | Host | Role | State | TL | Lag in MB |
142142
+---------------+----------------+--------------+-----------+----+-----------+
@@ -154,7 +154,7 @@ Sometimes the cluster member might stuck in the middle of nowhere, the easiest w
154154
<details><summary>Example: cluster member re-initialization</summary>
155155

156156
```text
157-
ubuntu@juju-b87344-2:~$ sudo -u _daemon_ patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml reinit postgresql postgresql-1
157+
ubuntu@juju-b87344-2:~$ sudo patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml reinit postgresql postgresql-1
158158
+ Cluster: postgresql (7496847632512033809) ----+-----------+----+-----------+
159159
| Member | Host | Role | State | TL | Lag in MB |
160160
+---------------+----------------+--------------+-----------+----+-----------+

0 commit comments

Comments
 (0)