Skip to content

Commit

Permalink
fix: invalid date field in iqn/nqn
Browse files Browse the repository at this point in the history
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: #10206

Signed-off-by: bzub <bzub@users.noreply.github.com>
Signed-off-by: Noel Georgi <git@frezbo.dev>
  • Loading branch information
bzub authored and frezbo committed Jan 23, 2025
1 parent 82c9ec1 commit 3a38424
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/app/machined/pkg/controllers/files/iqn.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (ctrl *IQNController) Run(ctx context.Context, r controller.Runtime, _ *zap
spec := r.TypedSpec()

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

Expand Down
2 changes: 1 addition & 1 deletion internal/app/machined/pkg/controllers/files/nqn.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (ctrl *NQNController) Run(ctx context.Context, r controller.Runtime, _ *zap
spec := r.TypedSpec()

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

Expand Down

0 comments on commit 3a38424

Please sign in to comment.