зеркало из https://github.com/Azure/AzureVM.git
assorted fixes
This commit is contained in:
Родитель
c6834067d9
Коммит
9b5c430e8a
3
NEWS.md
3
NEWS.md
|
@ -2,9 +2,12 @@
|
|||
|
||||
- Add ability to retrieve an SSH public key from an Azure resource object. See `?user_config` for more information.
|
||||
- New predefined configurations for VMs and VM scalesets: Ubuntu 20.04; Debian 10 (w/backports); Centos 8.1; RHEL 8.1 and 8.2; Windows Server 2019. All new configurations except Centos are available as both generation 1 and generation 2 VMs. See `?vm_config` and `?vmss_config` for more information.
|
||||
- The default configuration for `create_vm` and `create_vm_scaleset` now uses Ubuntu 20.04.
|
||||
- Update the DSVM configuration functions `ubuntu_dsvm` and `windows_dsvm` to use the latest images. The Ubuntu DSVM no longer has a built-in data disk, so the `dsvm_disk_type` argument has been removed.
|
||||
- New `ubuntu_dsvm_gen2` configuration to create a gen2 Ubuntu DSVM.
|
||||
- Fix a bug that prevented Windows scalesets from being created.
|
||||
- Logic to detect a running VM now correctly handles VMs that are updating.
|
||||
- Assorted other minor fixes.
|
||||
|
||||
# AzureVM 2.1.1
|
||||
|
||||
|
|
|
@ -426,7 +426,8 @@ add_sub_methods <- function()
|
|||
add_rg_methods <- function()
|
||||
{
|
||||
az_resource_group$set("public", "create_vm", overwrite=TRUE,
|
||||
function(name, login_user, size="Standard_DS3_v2", config="ubuntu_18.04", managed_identity=TRUE, datadisks=numeric(0),
|
||||
function(name, login_user, size="Standard_DS3_v2", config="ubuntu_20.04",
|
||||
managed_identity=TRUE, datadisks=numeric(0),
|
||||
..., template, parameters, mode="Incremental", wait=TRUE)
|
||||
{
|
||||
stopifnot(inherits(login_user, "user_config"))
|
||||
|
@ -449,7 +450,7 @@ add_rg_methods <- function()
|
|||
})
|
||||
|
||||
az_resource_group$set("public", "create_vm_scaleset", overwrite=TRUE,
|
||||
function(name, login_user, instances, size="Standard_DS1_v2", config="ubuntu_18.04_ss",
|
||||
function(name, login_user, instances, size="Standard_DS1_v2", config="ubuntu_20.04_ss",
|
||||
..., template, parameters, mode="Incremental", wait=TRUE)
|
||||
{
|
||||
stopifnot(inherits(login_user, "user_config"))
|
||||
|
|
|
@ -36,8 +36,8 @@ public=list(
|
|||
status=NULL,
|
||||
|
||||
# need to record these since AzureRMR can't currently get API versions for subresources
|
||||
nic_api_version="2019-04-01",
|
||||
ip_api_version="2019-04-01",
|
||||
nic_api_version="2020-05-01",
|
||||
ip_api_version="2020-05-01",
|
||||
|
||||
sync_vm_status=function()
|
||||
{
|
||||
|
@ -289,12 +289,12 @@ private=list(
|
|||
Sys.sleep(5)
|
||||
self$sync_vm_status()
|
||||
if(length(self$status) == 2 &&
|
||||
self$status[1] == "succeeded" &&
|
||||
# self$status[1] == "succeeded" &&
|
||||
self$status[2] == "running")
|
||||
break
|
||||
}
|
||||
if(length(self$status) < 2 ||
|
||||
self$status[1] != "succeeded" ||
|
||||
# self$status[1] != "succeeded" ||
|
||||
self$status[2] != "running")
|
||||
stop("Unable to ", op, " VM", call.=FALSE)
|
||||
}
|
||||
|
|
|
@ -281,8 +281,9 @@ private=list(
|
|||
{
|
||||
params$instanceId <- NULL
|
||||
obj <- az_vm_resource$new(self$token, self$subscription, deployed_properties=params)
|
||||
obj$nic_api_version <- "2018-10-01"
|
||||
obj$ip_api_version <- "2018-10-01"
|
||||
# some subresource API versions don't match between VMs and VM scalesets
|
||||
obj$nic_api_version <- "2020-06-01"
|
||||
obj$ip_api_version <- "2020-06-01"
|
||||
|
||||
# make type and name useful
|
||||
obj$type <- self$type
|
||||
|
|
|
@ -13,6 +13,9 @@ location <- "australiaeast"
|
|||
user <- user_config("username", "../resources/testkey.pub")
|
||||
size <- "Standard_DS1_v2"
|
||||
|
||||
# turn off parallelisation
|
||||
maxpoolsize <- options(azure_vm_maxpoolsize=0)
|
||||
|
||||
rg <- AzureRMR::az_rm$
|
||||
new(tenant=tenant, app=app, password=password)$
|
||||
get_subscription(subscription)$
|
||||
|
@ -61,4 +64,4 @@ test_that("Scaleset options work",
|
|||
})
|
||||
|
||||
rg$delete(confirm=FALSE)
|
||||
|
||||
options(maxpoolsize)
|
||||
|
|
|
@ -31,13 +31,13 @@ test_that("Scaleset connection pool works",
|
|||
expect_is(inst, "list")
|
||||
expect_length(inst, 5)
|
||||
|
||||
expect_message(vm$run_script("ls /tmp", id=names(inst)[1:2]), "Creating background pool")
|
||||
vm$run_script("ls /tmp", id=names(inst)[1:2])
|
||||
expect_identical(pool_size(), 2L)
|
||||
|
||||
expect_silent(vm$get_vm_private_ip_addresses(names(inst[1:2])))
|
||||
expect_silent(vm$get_vm_private_ip_addresses(inst[1:2]))
|
||||
|
||||
expect_message(vm$get_vm_private_ip_addresses(), "Creating background pool")
|
||||
vm$get_vm_private_ip_addresses()
|
||||
expect_identical(pool_size(), 5L)
|
||||
|
||||
expect_silent(vm$get_vm_private_ip_addresses(inst))
|
||||
|
|
Загрузка…
Ссылка в новой задаче