Skip to content

Commit 3a38424

Browse files
bzubfrezbo
authored andcommitted
fix: invalid date field in iqn/nqn
This sets the date field to `yyyy-mm` in the generated IQN/NQN. See: https://datatracker.ietf.org/doc/html/rfc7143#section-4.2.7.4 Fixes: siderolabs#10206 Signed-off-by: bzub <[email protected]> Signed-off-by: Noel Georgi <[email protected]>
1 parent 82c9ec1 commit 3a38424

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/app/machined/pkg/controllers/files/iqn.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func (ctrl *IQNController) Run(ctx context.Context, r controller.Runtime, _ *zap
8787
spec := r.TypedSpec()
8888

8989
// Fri Nov 3 16:19:12 2017 -0700 is the date of the first commit in the talos repository.
90-
spec.Contents = []byte(fmt.Sprintf("InitiatorName=iqn.2017.11.dev.talos:%s\n", machineID))
90+
spec.Contents = []byte(fmt.Sprintf("InitiatorName=iqn.2017-11.dev.talos:%s\n", machineID))
9191
spec.Mode = 0o600
9292
spec.SelinuxLabel = constants.EtcSelinuxLabel
9393

internal/app/machined/pkg/controllers/files/nqn.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func (ctrl *NQNController) Run(ctx context.Context, r controller.Runtime, _ *zap
108108
spec := r.TypedSpec()
109109

110110
// Fri Nov 3 16:19:12 2017 -0700 is the date of the first commit in the talos repository.
111-
spec.Contents = []byte(fmt.Sprintf("nqn.2017.11.dev.talos:uuid:%s", hostID.String()))
111+
spec.Contents = []byte(fmt.Sprintf("nqn.2017-11.dev.talos:uuid:%s", hostID.String()))
112112
spec.Mode = 0o600
113113
spec.SelinuxLabel = constants.EtcSelinuxLabel
114114

0 commit comments

Comments
 (0)