Skip to content

Commit 77c965f

Browse files
authored
Merge release v0.1.26
Release v0.1.26
2 parents 326c9ca + 7e9ed24 commit 77c965f

3 files changed

Lines changed: 140 additions & 47 deletions

File tree

docs/guides/ha-cluster/readme.md

Lines changed: 43 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ NNF software supports provisioning of Red Hat GFS2 (Global File System 2) storag
1515
- [Quorum Configuration](#quorum-configuration)
1616
- [Why the Rabbit Needs 17 Votes](#why-the-rabbit-needs-17-votes)
1717
- [Configuring Quorum Votes](#configuring-quorum-votes)
18-
- [Fencing with fence_recorder](#fencing-with-fence_recorder)
18+
- [Fencing with fence_dummy](#fencing-with-fence_dummy)
1919
- [How It Works](#how-it-works)
2020
- [Installation](#installation)
2121
- [STONITH Configuration](#stonith-configuration)
@@ -169,9 +169,9 @@ corosync-quorumtool
169169

170170
The output should show the Rabbit with 17 votes and each compute with 1 vote, for a total of 33 votes and quorum at 17.
171171

172-
## Fencing with fence_recorder
172+
## Fencing with fence_dummy
173173

174-
The `fence_recorder` agent coordinates fencing with external NNF software using a request/response file pattern. When Pacemaker decides to fence a compute node, `fence_recorder`:
174+
The [`fence_dummy`](https://github.com/ClusterLabs/fence-agents/tree/main/agents/dummy) agent coordinates fencing with external NNF software using a request/response file pattern. When Pacemaker decides to fence a compute node, `fence_dummy`:
175175

176176
1. Writes a fence request file
177177
2. Waits for the NNF software to process the request and write a response
@@ -188,10 +188,10 @@ This allows the NNF software to perform storage cleanup (detaching NVMe namespac
188188
│ Pacemaker/Corosync │
189189
│ (Cluster Manager) │
190190
└──────────┬───────────┘
191-
│ Calls fence_recorder
191+
│ Calls fence_dummy
192192
193193
┌──────────────────────┐ ┌───────────────────────────────┐
194-
fence_recorder │──────▶│ Request File │
194+
fence_dummy │──────▶│ Request File │
195195
│ (Fence Agent) │ │ requests/<node>-<uuid>.json │
196196
└──────────────────────┘ └───────────────────────────────┘
197197
│ │
@@ -218,12 +218,12 @@ This allows the NNF software to perform storage cleanup (detaching NVMe namespac
218218

219219
### Installation
220220

221-
Install `fence_recorder` on all nodes in the cluster:
221+
Install `fence_dummy` on all nodes in the cluster:
222222

223223
```bash
224224
# Copy the agent to each node
225-
sudo cp fence_recorder /usr/sbin/fence_recorder
226-
sudo chmod 755 /usr/sbin/fence_recorder
225+
sudo cp fence_dummy /usr/sbin/fence_dummy
226+
sudo chmod 755 /usr/sbin/fence_dummy
227227

228228
# Create the request/response directories on each rabbit node
229229
sudo mkdir -p /localdisk/fence-recorder/{requests,responses}
@@ -241,7 +241,7 @@ Create a STONITH resource for each compute node. Run these commands from any nod
241241
```bash
242242
# Create STONITH resources for all 16 compute nodes (1-16)
243243
for i in $(seq 1 16); do
244-
pcs stonith create compute-${i}-fence-recorder fence_recorder \
244+
pcs stonith create compute-${i}-fence-dummy fence_dummy \
245245
port=compute-${i} \
246246
pcmk_host_list=compute-${i} \
247247
request_dir=/localdisk/fence-recorder/requests \
@@ -258,7 +258,7 @@ Alternatively, create resources individually:
258258

259259
```bash
260260
# Example: Create STONITH for rabbit-compute-1
261-
pcs stonith create compute-1-fence-recorder fence_recorder \
261+
pcs stonith create compute-1-fence-dummy fence_dummy \
262262
port=rabbit-compute-1 \
263263
pcmk_host_list=compute-1 \
264264
request_dir=/localdisk/fence-recorder/requests \
@@ -273,10 +273,34 @@ pcs stonith create compute-1-fence-recorder fence_recorder \
273273
|--------|---------|-------------|
274274
| `port` | (required) | Target node name to fence |
275275
| `pcmk_host_list` | (required) | Node this STONITH resource can fence |
276-
| `request_dir` | `/var/run/fence_recorder/requests` | Directory for fence request files |
277-
| `response_dir` | `/var/run/fence_recorder/responses` | Directory for fence response files |
276+
| `request_dir` | `/var/run/fence_dummy/requests` | Directory for fence request files |
277+
| `response_dir` | `/var/run/fence_dummy/responses` | Directory for fence response files |
278278
| `log_dir` | `/var/log/cluster` | Directory for log files |
279279

280+
### NNF Software Configuration
281+
282+
The nnf-node-manager DaemonSet must be configured with the **same** request and response directories used by the `fence_dummy` agent. These are controlled by environment variables in the pod spec:
283+
284+
| Environment Variable | Default | Description |
285+
|---------------------|---------|-------------|
286+
| `NNF_FENCE_REQUEST_DIR` | `/localdisk/fence-recorder/requests` | Directory where fence agents write JSON request files |
287+
| `NNF_FENCE_RESPONSE_DIR` | `/localdisk/fence-recorder/responses` | Directory where nnf-sos writes JSON response files |
288+
289+
These variables are set in the nnf-node-manager DaemonSet manifest (`config/manager/manager.yaml`):
290+
291+
```yaml
292+
env:
293+
- name: NNF_FENCE_REQUEST_DIR
294+
value: "/localdisk/fence-recorder/requests"
295+
- name: NNF_FENCE_RESPONSE_DIR
296+
value: "/localdisk/fence-recorder/responses"
297+
```
298+
299+
When unset or empty, the defaults shown above are used. The nnf-node-manager creates the directories automatically if they do not exist.
300+
301+
!!! important
302+
The `request_dir` and `response_dir` values in the STONITH resource configuration **must match** the `NNF_FENCE_REQUEST_DIR` and `NNF_FENCE_RESPONSE_DIR` environment variables in the nnf-node-manager pod. If they differ, fence requests will not be detected.
303+
280304
### Verifying Configuration
281305

282306
```bash
@@ -286,15 +310,15 @@ pcs stonith status
286310
# View STONITH configuration
287311
pcs stonith config
288312
289-
# Test that fence_recorder can generate metadata
290-
fence_recorder --action metadata
313+
# Test that fence_dummy can generate metadata
314+
fence_dummy --action metadata
291315
```
292316

293317
## Request/Response Protocol
294318

295319
### Request File Format
296320

297-
When a fence operation is triggered, `fence_recorder` writes a JSON request file:
321+
When a fence operation is triggered, `fence_dummy` writes a JSON request file:
298322

299323
**Location**: `<request_dir>/<node>-<uuid>.json`
300324

@@ -379,21 +403,21 @@ journalctl -u pacemaker | grep -i stonith
379403
ls -la /localdisk/fence-recorder/requests/
380404
ls -la /localdisk/fence-recorder/responses/
381405
382-
# Check fence_recorder logs
406+
# Check fence_dummy logs
383407
tail -f /var/log/cluster/fence-events.log
384408
```
385409

386410
**Module not found error:**
387-
Ensure the fencing library path is correct in `/usr/sbin/fence_recorder`. The `sys.path.append` line should point to `/usr/share/fence`.
411+
Ensure the fencing library path is correct in `/usr/sbin/fence_dummy`. The `sys.path.append` line should point to `/usr/share/fence`.
388412

389413
### Testing Fence Operations
390414

391415
```bash
392416
# Test metadata generation
393-
fence_recorder --action metadata
417+
fence_dummy --action metadata
394418
395419
# Test monitor action (non-destructive)
396-
fence_recorder --action monitor -n rabbit-compute-1 \
420+
fence_dummy --action monitor -n rabbit-compute-1 \
397421
--request-dir=/localdisk/fence-recorder/requests \
398422
--response-dir=/localdisk/fence-recorder/responses
399423
```

docs/repo-guides/release-nnf-sw/release-all.md

Lines changed: 96 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,88 @@ other components.
1717
- [DataWorkflowServices/dws](https://github.com/DataWorkflowServices/dws)
1818
- [HewlettPackard/lustre-csi-driver](https://github.com/HewlettPackard/lustre-csi-driver)
1919
- [NearNodeFlash/lustre-fs-operator](https://github.com/NearNodeFlash/lustre-fs-operator)
20-
- [NearNodeFlash/nnf-mfu](https://github.com/NearNodeFlash/nnf-mfu)
21-
- [NearNodeFlash/nnf-ec](https://github.com/NearNodeFlash/nnf-ec)
20+
- [NearNodeFlash/nnf-mfu](https://github.com/NearNodeFlash/nnf-mfu) *(standalone repo, not a submodule)*
21+
- [NearNodeFlash/nnf-ec](https://github.com/NearNodeFlash/nnf-ec) *(standalone repo, not a submodule)*
2222
- [NearNodeFlash/nnf-sos](https://github.com/NearNodeFlash/nnf-sos)
2323
- [NearNodeFlash/nnf-dm](https://github.com/NearNodeFlash/nnf-dm)
2424
- [NearNodeFlash/nnf-integration-test](https://github.com/NearNodeFlash/nnf-integration-test)
2525

2626
- [NearNodeFlash/NearNodeFlash.github.io](https://github.com/NearNodeFlash/NearNodeFlash.github.io)
2727

28+
The release order matters because of dependency relationships between repos. The `release-all.sh`
29+
tool enforces the following order:
30+
31+
1. `dws`
32+
2. `lustre-csi-driver`
33+
3. `lustre-fs-operator`
34+
4. `nnf-mfu`
35+
5. `nnf-ec`
36+
6. `nnf-sos` (depends on dws, nnf-mfu, nnf-ec)
37+
7. `nnf-dm` (depends on dws, nnf-sos, nnf-mfu)
38+
8. `nnf-integration-test` (depends on dws, nnf-sos, nnf-dm, lustre-fs-operator)
39+
9. `nnf-deploy` (packages all submodules)
40+
10. `NearNodeFlash.github.io` (documentation, version matches nnf-deploy)
41+
2842
## Overview of release-all tool
2943

3044
`release-all.sh` automates most of the steps of releasing NNF software and adds additional checks for common issues.
3145

46+
## Prerequisites
47+
48+
The following tools must be installed and available in your PATH:
49+
50+
| Tool | Purpose | Notes |
51+
|------|---------|-------|
52+
| `gh` | GitHub CLI for PRs, releases | Requires `GH_TOKEN` env var (see below) |
53+
| `yq` | YAML processing | Must be the [Go version](https://github.com/mikefarah/yq), not the Python version |
54+
| `jq` | JSON processing | Used by `final-release-notes.sh` |
55+
| `git` | Version control | SSH access to GitHub required |
56+
| `make` | Build automation | Runs `make manifests`, `make generate`, etc. |
57+
| `perl` | Version string manipulation | Used for semver bump calculations |
58+
| `sed` | Text processing | |
59+
| `tput` | Terminal formatting | |
60+
61+
**Environment variables:**
62+
63+
- `GH_TOKEN` — A GitHub classic personal access token with `repo` scope. Required by `gh` and by the `release-push`, `create-pr`, `merge-pr`, and `tag-release` phases.
64+
65+
**SSH access:**
66+
67+
- Verify with `ssh -T git@github.com`. The release tool clones all repos via SSH.
68+
3269
## Assumptions
3370

3471
- `master` or `main` branch for each repository contains **tested** software and documentation ready to be released.
35-
- You've installed the GitHub CLI tool, `gh`.
36-
- This tool requires a GH_TOKEN environment variable containing a `repo` scope classic token.
3772

3873
## Steps
3974

4075
### Run the steps in this order
4176

42-
> **Note:** You almost always want to use the -R option to focus the `phase` activity to a specific repo.
77+
> **Note:** You almost always want to use the `-R` option to focus the `phase` activity to a specific repo.
78+
>
79+
> Use `-B major|minor|patch` (default: `patch`) to control which part of the version number is bumped.
4380
44-
0. **List Repos:** Get the ordered list of repo names to use with -R option in subsequent steps. This is referred to as `repo-list`
81+
0. **List Repos:** Get the ordered list of repo names to use with `-R` option in subsequent steps. This is referred to as `repo-list`
4582
> **Pro tip:** Keep this list in a separate window for easy viewing
83+
84+
```bash
4685
./release-all.sh -L
86+
```
87+
88+
The output will show the repos in dependency order:
89+
90+
```
91+
dws
92+
lustre_csi_driver
93+
lustre_fs_operator
94+
nnf_mfu
95+
nnf_ec
96+
nnf_sos
97+
nnf_dm
98+
nnf_integration_test
99+
nnf_deploy
100+
nnf_doc
101+
```
47102

48103
1. **Check Vendoring:** For each repo's master/main branch; determine whether any of them need to be re-vendored.
49104
> **Note:** Ensure each repo is error-free before proceeding to the next repo in `repo-list`
@@ -61,21 +116,24 @@ other components.
61116
```
62117

63118
3. **Generate Release:** For each repo in `repo-list`, proceed through the following steps in sequence before moving on to the next repo.
64-
> **Note:** The next steps use the gh(1) GitHub CLI tool and require a GH_TOKEN environment variable containing a 'repo' scope classic token.
65-
1. If the **Create Trial Release Branch** had no errors:
119+
> **Note:** The next steps use the `gh` GitHub CLI tool and require a `GH_TOKEN` environment variable containing a `repo` scope classic token.
120+
121+
**Step 3a — Push the release branch.** Choose one of the following based on whether step 2 had merge conflicts:
122+
123+
- If the **Create Trial Release Branch** had **no errors**:
66124

67125
```bash
68126
./release-all.sh -P release-push -R <repo>
69127
```
70128

71-
2. If **Create Trial Release Branch** was unable to auto merge, manually fix and merge the release branch and re-run this phase on that existing branch:
129+
- If **Create Trial Release Branch** was unable to auto merge, manually fix and merge the release branch, then re-run this phase on the existing branch:
72130

73131
```bash
74-
cd workingspace/repo
132+
cd workingspace/<repo>
75133
# Manually merge the changes from master/main to the release branch
76134
go mod tidy
77135
go mod vendor
78-
git status # confirm all issues have been address
136+
git status # confirm all issues have been addressed
79137
git add <all affected files>
80138
git commit -s # take the default commit message, don't bother editing it.
81139
```
@@ -86,44 +144,55 @@ other components.
86144
USE_EXISTING_WORKAREA=1 ./release-all.sh -P release-push -R <repo>
87145
```
88146

89-
3. Create PR for the pushed release branch:
147+
**Step 3b** Create PR for the pushed release branch:
90148

91-
```bash
92-
./release-all.sh -P create-pr -R <repo>
93-
```
149+
```bash
150+
./release-all.sh -P create-pr -R <repo>
151+
```
94152

95-
4. Merge PR for the pushed release branch:
96-
**Note: Do NOT manually merge the PR, let `release-all.sh` merge it.**
153+
**Step 3c** — Merge PR for the pushed release branch:
97154

98-
```bash
99-
./release-all.sh -P merge-pr -R <repo>
100-
```
155+
> **Warning:** Do NOT manually merge the PR. Let `release-all.sh` merge it. If you accidentally merge manually, the `tag-release` phase may not find the expected merge commit message — use `-x force-tag=vX.Y.Z` to recover (see step 3d).
101156

102-
5. Tag the release:
157+
```bash
158+
./release-all.sh -P merge-pr -R <repo>
159+
```
103160

104-
```bash
105-
./release-all.sh -P tag-release -R <repo>
106-
```
161+
**Step 3d** — Tag the release:
162+
163+
> **Important:** This creates an **annotated** git tag. The CI/CD workflow (`handle_release_tag.yaml`) verifies that the tag is annotated and will reject lightweight tags. After tagging, the CI/CD workflow automatically creates the GitHub release with auto-generated release notes and attaches build artifacts (e.g., `manifests.tar` for `nnf-deploy`).
164+
165+
```bash
166+
./release-all.sh -P tag-release -R <repo>
167+
```
168+
169+
If tagging fails because the most recent commit doesn't contain the expected merge message (e.g., due to a manual merge), use the force-tag override:
170+
171+
```bash
172+
./release-all.sh -P tag-release -R <repo> -x force-tag=vX.Y.Z
173+
```
107174
108175
## Finalize the release notes
109176
110177
Finalize the release by updating the `nnf-deploy` release notes to include the release notes from all submodules that were modified by this release. This also updates the release notes for any submodule that has CRDs, to include information about each version of the CRD offered by that submodule. Do this after the release steps have been completed for all repositories, including the NearNodeFlash.github.io repository.
111178
179+
> **Note:** `final-release-notes.sh` requires `yq`, `gh`, `jq`, and `perl` to be installed, and `GH_TOKEN` to be set.
180+
112181
1. Generate complete release notes for the specified `nnf-deploy` release for review:
113182
114183
```bash
115184
./final-release-notes.sh -r $NNF_RELEASE
116185
```
117186
118-
2. Generate and commit the release notes to the specified `nnf-deploy` release:
187+
2. Review the generated notes, then commit them:
119188
120189
```bash
121190
./final-release-notes.sh -r $NNF_RELEASE -C
122191
```
123192
124-
## Compare release manifests
193+
## Verify the release
125194
126-
Compare the new NNF release manifest to a previous NNF release manifest. This can be useful for a variety of purposes. For example, this is a quick way to check for any problems in the release or to see which submodules were updated in the release.
195+
After all repos are released and release notes are finalized, compare the new NNF release manifest to the previous release manifest. This is a recommended verification step to confirm the release contains the expected changes and catch any problems.
127196
128197
```console
129198
./compare-releases.sh v0.1.6 v0.1.7

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Release: 0.1.25
1+
# Release: 0.1.26
22
site_name: NNF
33
site_description: 'Near Node Flash'
44
docs_dir: docs/

0 commit comments

Comments
 (0)