-
Notifications
You must be signed in to change notification settings - Fork 148
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
azblk handler version 1 #540
base: main
Are you sure you want to change the base?
Conversation
The azure page blob handler is based on and serves as a user-space alternative to khenidak's dysk kernel block driver (https://github.com/khenidak/dysk). An azblk target device will be exposed to the local host as a TCMU scsi device via the target loopback driver (targetcli loopback transport). azblk currently supports SAS access credentials, lease ids, local read only permissions, http, and https. Each azblk target device must be configured through a configuration file whose default location is /etc/tcmu/azblk.conf. Sample config file: device = ( { name = "azblk1_http"; sas = "sp=rcwd&st=2019-02-22T15:00:55Z&se=2019-03-22T22:00:55Z&spr=https,http&sv=2018-03-28&sig=anIkHRlkadfjlkajdQVqIvENpLO9FL1zyQ%3D&sr=b"; lease = "48e29061-079d-446c-833c-5d884ab5ec1e"; url = "http://myazureaccount.blob.core.windows.net/test/test1.vhd"; }, { name = "azblk2_https"; sas = "sp=rcwd&st=2019-03-07T13:43:02Z&se=2019-04-04T20:43:02Z&spr=https,http&sv=2018-03-28&sig=MW3SK5h99alskdfjlkjnvV3xz%2BLLcAhDVI%3D&sr=b"; readonly = 1; url = "https://myazureaccount.blob.core.windows.net/test/test2.vhd"; } ); Signed-off-by: Cathy Avery <[email protected]>
@@ -0,0 +1,1006 @@ | |||
/* | |||
* Copyright (c) 2018 Red Hat, Inc. | |||
* |
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.
Do you mean 2019 here ?
curl_socket_t sockfd; | ||
struct azblk_dev *ddev; | ||
}; | ||
|
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.
There has one extra white line :-)
|
||
return data_size; | ||
} | ||
|
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.
Extra white line.
AZ_SAS_LEN); | ||
goto error; | ||
} | ||
strncpy(ddev->cfg.sas, sas, len); |
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.
Here we'd better to use the strlcpy as Mike has introduce it from BSD locally.
https://github.com/open-iscsi/tcmu-runner/blob/master/strlcpy.c
case CURLMSG_DONE: | ||
azblk_multi_done(curl_multi, message); | ||
break; | ||
|
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.
Extra white line here.
The azure page blob handler is based on and serves as a user-space
alternative to khenidak's dysk kernel block driver
(https://github.com/khenidak/dysk).
An azblk target device will be exposed to the local host as a TCMU scsi
device via the target loopback driver (targetcli loopback transport).
azblk currently supports SAS access credentials, lease ids,
local read only permissions, http, and https.
Each azblk target device must be configured through a configuration
file whose default location is /etc/tcmu/azblk.conf.
Sample config file:
device =
(
{
name = "azblk1_http";
sas = "sp=rcwd&st=2019-02-22T15:00:55Z&se=2019-03-22T22:00:55Z&spr=https,http&sv=2018-03-28&sig=anIkHRlkadfjlkajdQVqIvENpLO9FL1zyQ%3D&sr=b";
lease = "48e29061-079d-446c-833c-5d884ab5ec1e";
url = "http://myazureaccount.blob.core.windows.net/test/test1.vhd";
},
{
name = "azblk2_https";
sas = "sp=rcwd&st=2019-03-07T13:43:02Z&se=2019-04-04T20:43:02Z&spr=https,http&sv=2018-03-28&sig=MW3SK5h99alskdfjlkjnvV3xz%2BLLcAhDVI%3D&sr=b";
readonly = 1;
url = "https://myazureaccount.blob.core.windows.net/test/test2.vhd";
}
);
Signed-off-by: Cathy Avery [email protected]