Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
a9f06f0
Add ageing cache to dns alias driver
PaulJouvanceau Jul 22, 2026
14611b8
fix(resipsgcp_dnsalias): address cache vulnerabilities
PaulJouvanceau Aug 31, 2026
2665917
Add DNS and CG endpoints to test server
PaulJouvanceau Jul 23, 2026
a40501c
feat(drivers): implement SGCP NFS consistency group resource
PaulJouvanceau Jul 16, 2026
9de91f4
fix: adjust resume-replication mock to preserve hook-set status
PaulJouvanceau Aug 31, 2026
4fa2b15
fix: address Aikido security findings in resfssgcp_nfs_cg driver
PaulJouvanceau Aug 31, 2026
214a300
Refactor precondition error handling with `ErrPrecondition`
cgalibern Sep 2, 2026
e8fccc7
Refactor consistency group cache with `ageingcache`
cgalibern Sep 2, 2026
66ca4c9
Refuse to configure a sgcp_nfs_cg resource without an availability zone
cgalibern Sep 2, 2026
459ae29
Link the sgcp_nfs_cg driver in
cgalibern Sep 2, 2026
26ef171
Fix the sgcp_nfs_cg failover keyword documentation
cgalibern Sep 2, 2026
91afb4e
Keep the sgcp tests out of the node var directory
cgalibern Sep 2, 2026
4b1b38e
Don't read an unreadable sgcp disabled flag as a disable
cgalibern Sep 2, 2026
e09f636
Honor the sgcp disabled flag in the dns alias driver
cgalibern Sep 2, 2026
a385c3c
Clear the alias cache entry the read actually filled
cgalibern Sep 2, 2026
c8afd7a
Gate the sgcp_nfs_cg failover fallback on the daemon origins only
cgalibern Sep 2, 2026
86957a7
Have one cache setting, and have the dns alias driver read it
cgalibern Sep 2, 2026
b8071c8
Return why a consistency group is still not resumed
cgalibern Sep 2, 2026
17091cb
Report a consistency group cache the read can not drop
cgalibern Sep 2, 2026
9fbd431
Drop the availability zone ResumeReplication ignored
cgalibern Sep 2, 2026
d14dcf0
Stop handing provider text over as a log format
cgalibern Sep 2, 2026
f0d0a03
Have the consistency group stop say what it does
cgalibern Sep 2, 2026
f3d85c8
Stop timing the consistency group status test
cgalibern Sep 2, 2026
76ebc93
Leave the group alone when the mock resume is refused
cgalibern Sep 2, 2026
838442a
Keep the test server credentials out of its output
cgalibern Sep 2, 2026
66d36f7
Add env.HasDaemonSchedulerOrigin
cgalibern Sep 2, 2026
bb47a4d
Serve the sgcp caches to the daemon scheduler only
cgalibern Sep 2, 2026
87e4987
Send the dns alias requests to the endpoint keyword
cgalibern Sep 3, 2026
a730aec
Read a filesystem the provider does not have as an absence
cgalibern Sep 3, 2026
e5b73ab
[Makefile] Use `-trimpath` to build om, om and compobj
cgalibern Sep 4, 2026
9bb6eb0
[config] Add configurable `files.cg.timeout` parameter to sgcp config…
cgalibern Sep 4, 2026
f0fe27e
[resfssgcp_nf] Fix Timeout with default value from sgcp configuration
cgalibern Sep 4, 2026
53afda8
[resfssgcp_nfs_cg] Add missing `Restart` field to type `T`
cgalibern Sep 4, 2026
ea4050d
[sgcp] Stop reporting an http status > 400 as an error in `Api.do`
cgalibern Sep 7, 2026
7e8e411
[resipsgcp_dnsalias] Refactor `cacheSig` into `cacheSigGetAliases` fo…
cgalibern Sep 7, 2026
1ffa7b9
[resfssgcp_nfs] Refactor cache signature composition with sha256
cgalibern Sep 7, 2026
34cdc5c
[resfssgcp_nfs_cg] Refactor cache signature composition with sha256
cgalibern Sep 7, 2026
c287cad
[resfssgcp_nfs] Drop the redundant in-process `fileInfoCache`
cgalibern Sep 7, 2026
5f6460d
[sgcp] Remove redundant debug log for HTTP 400+ status codes in `Api.do`
cgalibern Sep 7, 2026
bb567bd
[sgcp drivers] Add StatusLog warnings for potential stale cache values
cgalibern Sep 7, 2026
9c3ba07
[sgcp drivers] Add debug logs for cache clearing and signatures
cgalibern Sep 7, 2026
30c49d8
[resfssgcp_nfs_cg] Change driver from GroupFS to GroupDisk
cgalibern Sep 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ clean:
rm -f $(OM) $(OX)

compobj:
$(GOBUILD) -o $(COMPOBJ) ./util/compobj/
$(GOBUILD) -trimpath -o $(COMPOBJ) ./util/compobj/

compobj-race:
$(GOBUILDRACE) -o $(COMPOBJ) ./util/compobj/
Expand Down Expand Up @@ -94,13 +94,13 @@ install:
$(PREFIX)/$(COMPOBJ) -i $(PREFIX)/$(COMPOBJ_D)

om:
$(GOBUILD) -o $(OM) ./cmd/om/
$(GOBUILD) -trimpath -o $(OM) ./cmd/om/

om-race:
$(GOBUILDRACE) -o $(OM) ./cmd/om/

ox:
$(GOBUILD) -o $(OX) ./cmd/ox/
$(GOBUILD) -trimpath -o $(OX) ./cmd/ox/

ox-race:
$(GOBUILDRACE) -o $(OX) ./cmd/ox/
Expand Down
1 change: 1 addition & 0 deletions core/driverdb/drivers.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
_ "github.com/opensvc/om3/v3/drivers/resdisklv"
_ "github.com/opensvc/om3/v3/drivers/resdiskmd"
_ "github.com/opensvc/om3/v3/drivers/resdiskraw"
_ "github.com/opensvc/om3/v3/drivers/resdisksgcp_nfs_cg"
_ "github.com/opensvc/om3/v3/drivers/resdiskvg"
_ "github.com/opensvc/om3/v3/drivers/resdiskxp8"
_ "github.com/opensvc/om3/v3/drivers/resfsdir"
Expand Down
17 changes: 15 additions & 2 deletions core/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ var (
)

// HasDaemonOrigin returns true if the environment variable OSVC_ACTION_ORIGIN
// is set to "daemon". The opensvc daemon sets this variable on every command
// is set to one of the daemon origins: "daemon/monitor", "daemon/api" or
// "daemon/scheduler". The opensvc daemon sets this variable on every command
// it executes.
func HasDaemonOrigin() bool {
switch Origin() {
Expand All @@ -38,7 +39,7 @@ func HasDaemonOrigin() bool {
}

// HasDaemonMonitorOrigin returns true if the environment variable OSVC_ACTION_ORIGIN
// is set to "daemon/imon". The opensvc daemon sets this variable on every command
// is set to "daemon/monitor". The opensvc daemon sets this variable on every command
// it executes.
func HasDaemonMonitorOrigin() bool {
switch Origin() {
Expand All @@ -49,6 +50,18 @@ func HasDaemonMonitorOrigin() bool {
}
}

// HasDaemonSchedulerOrigin returns true if the environment variable
// OSVC_ACTION_ORIGIN is set to "daemon/scheduler", which the daemon sets on
// the commands its scheduler runs.
func HasDaemonSchedulerOrigin() bool {
switch Origin() {
case ActionOriginDaemonScheduler:
return true
default:
return false
}
}

// Origin returns the action origin using a env var that the daemon sets when
// executing a CRM action.
func Origin() ActionOrigin {
Expand Down
35 changes: 35 additions & 0 deletions core/env/env_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package env

import (
"testing"

"github.com/stretchr/testify/assert"
)

func TestOriginPredicates(t *testing.T) {
cases := []struct {
origin string
daemon bool
monitor bool
scheduler bool
}{
{origin: "", daemon: false, monitor: false, scheduler: false},
{origin: string(ActionOriginUser), daemon: false, monitor: false, scheduler: false},
{origin: string(ActionOriginDaemonMonitor), daemon: true, monitor: true, scheduler: false},
{origin: string(ActionOriginDaemonAPI), daemon: true, monitor: false, scheduler: false},
{origin: string(ActionOriginDaemonScheduler), daemon: true, monitor: false, scheduler: true},

// The daemon never sets these, and none of them is a daemon origin.
{origin: "daemon", daemon: false, monitor: false, scheduler: false},
{origin: "scheduler", daemon: false, monitor: false, scheduler: false},
}

for _, tc := range cases {
t.Run("origin "+tc.origin, func(t *testing.T) {
t.Setenv(ActionOriginVar, tc.origin)
assert.Equal(t, tc.daemon, HasDaemonOrigin(), "HasDaemonOrigin")
assert.Equal(t, tc.monitor, HasDaemonMonitorOrigin(), "HasDaemonMonitorOrigin")
assert.Equal(t, tc.scheduler, HasDaemonSchedulerOrigin(), "HasDaemonSchedulerOrigin")
})
}
}
File renamed without changes.
Loading