Skip to content
Open
Changes from 2 commits
Commits
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
4 changes: 4 additions & 0 deletions pkg/blob/nodeserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,10 @@ func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRe
}

// Get mountOptions that the volume will be formatted and mounted with
if protocol == Fuse2 {
// Adding telemetry tag to know that blob is been mounted through AKS
mountFlags = util.JoinMountOptions(mountFlags, []string{fmt.Sprintf("--telemetry=azpartner-aks/%s", d.Version)})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

follow the PR example here: #2024 since protocol may be empty here, and also check whether this option is already specified

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, I think just use --telemetry=aks/%s is more straightfoward

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Andy, I have moved the code to under pkg/blobfuse-proxy/server.go and if user specifies the option through StorageClass then we are appending above to telemetry option

ex: In below example user has provided telemetry as part of mount option...

mountOptions:
  - -o allow_other
  - --file-cache-timeout-in-seconds=120
  - --use-attr-cache=true
  - --cancel-list-on-mount-seconds=10  # prevent billing charges on mounting
  - -o attr_timeout=120
  - -o entry_timeout=120
  - -o negative_timeout=120
  - --telemetry=tire1

Then mount args to blobfuse2 will be (--telemetry=azpartner-aks/v1.28.0,normaltest)

 server.go:99] updated --telemetry tag in mount args: mount /var/lib/kubelet/plugins/kubernetes.io/csi/blob.csi.azure.com/d6b00230de0d40736dda3f197b49a4919bfb9b7512f4466d881183c6a2baa974/globalmount -o allow_other --file-cache-timeout-in-seconds=120 --use-attr-cache=true --cancel-list-on-mount-seconds=10 -o attr_timeout=120 -o entry_timeout=120 -o negative_timeout=120 --log-level=LOG_DEBUG --cache-size-mb=1000  --telemetry=azpartner-aks/v1.28.0,normaltest --pre-mount-validate=true --use-https=true --empty-dir-check=false --tmp-path=/mnt/<RG>#<Storage Account>#<Contianer>#<Blob>#default# --container-name=traineddata --ignore-open-flags=true --disable-version-check=true

Note: If there is no --telemetry in mount option then --telemetry=azpartner-aks/v1.28.0.

btw, I think just use --telemetry=aks/%s is more straightfoward

The tag has been suggested by @vibhansa-msft, so not sure if there is any monitoring from blobfuse side

}
mountOptions := mountFlags
if ephemeralVol {
mountOptions = util.JoinMountOptions(mountOptions, strings.Split(ephemeralVolMountOptions, ","))
Expand Down
Loading