Repository navigation
feat(site): add the blockstor.org website #205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
e7831a3
581bc5d
c570d26
2ede504
ffadc5a
4acce64
6499ab6
701baf6
d2aac3f
ed70e6e
7238222
f0febbf
2fd81d8
f0cff1b
e4dac6e
e6224c0
cf42e5d
f81d695
545e4da
3c18d97
8a63103
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| name: Deploy site to Pages | ||
|
|
||
| # blockstor.org is the Hugo and Docsy site under site/. Netlify builds the | ||
| # deploy previews from the same sources (netlify.toml). | ||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - 'site/**' | ||
| - '.github/workflows/pages.yml' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| # One deployment at a time. A queued run is skipped for the newest one, but | ||
| # a deployment in progress is allowed to finish. | ||
| concurrency: | ||
| group: pages | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| HUGO_VERSION: 0.164.0 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Install Hugo | ||
| run: | | ||
| wget -q -O "${RUNNER_TEMP}/hugo.deb" \ | ||
| "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb" | ||
| sudo dpkg -i "${RUNNER_TEMP}/hugo.deb" | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 | ||
| with: | ||
| go-version: "1.23" | ||
| cache: false | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 | ||
| with: | ||
| # Hugo runs Node asset tools with "node --permission", which needs | ||
| # Node 22.13 or later. | ||
| node-version: "22" | ||
|
|
||
| - name: Setup Pages | ||
| id: pages | ||
| uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 | ||
|
|
||
| - name: Install Node.js dependencies | ||
| working-directory: site | ||
| run: npm ci | ||
|
|
||
| - name: Build with Hugo | ||
| working-directory: site | ||
| env: | ||
| HUGO_ENVIRONMENT: production | ||
| HUGO_ENV: production | ||
| BASE_URL: ${{ steps.pages.outputs.base_url }} | ||
| run: hugo --gc --minify --baseURL "${BASE_URL}/" | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 | ||
| with: | ||
| path: ./site/public | ||
|
|
||
| deploy: | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| runs-on: ubuntu-latest | ||
| needs: build | ||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,6 +60,7 @@ Row IDs match the command-catalogue indexes used by `cli-parity-refresh.sh` (see | |
| | 42 | `r d <rd> <nonexistent-node>` (idempotent resource delete) | WIRE_SHAPE | permanent | BLOCKSTOR idempotent-delete envelope. Deleting a resource placement on a node that holds none returns `SUCCESS: resource already absent: <node> on <rd>`; upstream LINSTOR returns `WARNING: Node: <rd>, Resource: <node> not found`. Both exit 0. Deliberate: a CSI `DeleteVolume` / operator retry on an already-removed placement MUST be idempotent. Same family as the snapshot-delete idempotency in row 33. Pinned by the resource-delete REST handler's already-absent path (`pkg/rest/resources.go`). | | ||
| | 40 | `n c <node> <ip> --node-type Satellite` (node-create success envelope) | WIRE_SHAPE | permanent | BLOCKSTOR envelope shape on satellite node registration. BS emits `node created: <node>` + a `SUCCESS: No active connection to satellite '<node>'` line; upstream emits `New node '<node>' registered.` (with a UUID detail) + a `WARNING: No active connection to satellite '<node>'` line whose Details explain the controller will (re-)establish the connection. Both register the node and exit 0; the operator-visible outcome (node exists, awaiting satellite handshake) is identical. The "no active connection" notice is INFO/SUCCESS-class in BS vs WARNING-class upstream, and BS does not surface the volatile node UUID inline. Envelope-shape only; no behavioural divergence. | | ||
| | 16 | `ps l` (physical-storage list — `size` field) | WIRE_SHAPE | 2026-12-31 | BS `/v1/physical-storage` omits the per-device `size` key that python-linstor's `show_physical_storage` reads unconditionally (`linstor/responses.py` `devices.size`), so `linstor ps l` raises `KeyError: 'size'` and exits 2 against BS where upstream renders the table and exits 0. `ps l` is a hardware-discovery convenience surface; linstor-csi / piraeus-operator never call it, and the device-pool creation path (`ps create-device-pool`, cli-matrix `ps-cdp-*`) is unaffected. Tracked as a missing wire field to populate on the physical-storage DTO; whitelisted until then. | | ||
| | 86 | `node interface modify <node> <nic> --active` | BEHAVIOR | permanent | blockstor has no satellite-to-controller connection to re-target: the satellite talks only to the Kubernetes API through the in-cluster Service. `NodeNetInterface` carries no `Active` field, and the REST `is_active` flag is synthesised on read as "first interface", so `--active` changes nothing. To make another interface active, reorder `spec.netInterfaces` so it comes first; a changed address reaches the node's DRBD configuration after its satellite pod restarts. Pinned by `TestSatelliteFlagsLackControllerBindAddress` and `TestNodeCRDHasNoActiveField` in `pkg/satellite/stream/redial_spec_test.go`. | | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -euo pipefail
# Inspect the REST conversion and the paths that select and render interface addresses.
rg -n -C 5 --glob '*.go' \
'is_active|IsActive|peerAddressWithPrefNic|NetInterfaces|netInterfaces' \
pkg/rest api/v1alpha1 pkg/dispatcher pkg/satelliteRepository: cozystack/blockstor Length of output: 42862 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- changed row ---'
git show 8a6310311c408657583e8d3a8dec38eb2cc49840:docs/cli-parity-known-deltas.md | nl -ba | sed -n '58,66p'
printf '%s\n' '--- REST active conversion and interface mutation ---'
rg -n -C 8 --glob '*.go' 'DefaultNetInterfaceFields|IsActive|is_active|PatchNetInterfaces|NetInterface.*active|active.*NetInterface' pkg/rest pkg/store api
printf '%s\n' '--- address selection and configuration consumers ---'
rg -n -C 10 --glob '*.go' 'preferredNetInterfaceAddress|peerAddressWithPrefNic|func peerAddress|PeerAddr|NetInterfaces\[0\]|SatelliteEndpoint|netInterfaces' pkg/dispatcher pkg/satellite pkg/rest api/v1alpha1 | sed -n '1,520p'Repository: cozystack/blockstor Length of output: 41991 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- resource rendering path ---'
sed -n '1,180p' pkg/satellite/controllers/resource.go
rg -n -C 8 --glob '*.go' 'BuildDesired|peer\..*address|drbd.*address|address.*res|Render.*res|\.res' pkg/satellite pkg/dispatcher | sed -n '1,420p'
printf '%s\n' '--- focused dispatcher address tests ---'
rg -n -C 12 --glob '*_test.go' 'PrefNic|k8s-internal|default.*first|peer.*address|BuildDesired|NetInterfaces.*Address' pkg/dispatcher | sed -n '1,420p'Repository: cozystack/blockstor Length of output: 41032 Correct row 86's citation and qualify its DRBD statement.
However, DRBD peer addresses use 🤖 Prompt for AI Agents |
||
|
|
||
| ## Open (block merge until addressed) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win
Give
pages: writeandid-token: writeonly to thedeployjob.The workflow-level
permissionsblock also gives these write scopes to thebuildjob. Thebuildjob runs only checkout and the artifact upload, and it does not need either scope. If a third-party action inbuildis compromised, it can mint an OIDC token or publish to Pages. Keepcontents: readat the workflow level and grant the write scopes ondeployonly.🔒️ Proposed fix
🧰 Tools
🪛 zizmor (1.30.1)
[error] 15-15: overly broad permissions (excessive-permissions): pages: write is overly broad at the workflow level
(excessive-permissions)
[error] 16-16: overly broad permissions (excessive-permissions): id-token: write is overly broad at the workflow level
(excessive-permissions)
🤖 Prompt for AI Agents
Source: Linters/SAST tools