Skip to content
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

Add trailing / to ubuntu: and ubuntu-daily: remotes to avoid redirects #14169

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion client/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
// }
//
// // Connect to the remote SimpleStreams server
// d, err = lxd.ConnectSimpleStreams("https://cloud-images.ubuntu.com/releases", nil)
// d, err = lxd.ConnectSimpleStreams("https://cloud-images.ubuntu.com/releases/", nil)
// if err != nil {
// return err
// }
Expand Down
12 changes: 6 additions & 6 deletions doc/howto/instances_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ To create a container with an Ubuntu 24.04 LTS image from the `ubuntu` server us
"source": {
"alias": "24.04",
"protocol": "simplestreams",
"server": "https://cloud-images.ubuntu.com/releases",
"server": "https://cloud-images.ubuntu.com/releases/",
"type": "image"
}
}'
Expand All @@ -154,7 +154,7 @@ To create a virtual machine with an Ubuntu 24.04 LTS image from the `ubuntu` ser
"source": {
"alias": "24.04",
"protocol": "simplestreams",
"server": "https://cloud-images.ubuntu.com/releases",
"server": "https://cloud-images.ubuntu.com/releases/",
"type": "image"
},
"type": "virtual-machine"
Expand Down Expand Up @@ -188,7 +188,7 @@ Or with a bigger disk:
"source": {
"alias": "24.04",
"protocol": "simplestreams",
"server": "https://cloud-images.ubuntu.com/releases",
"server": "https://cloud-images.ubuntu.com/releases/",
"type": "image"
},
"type": "virtual-machine"
Expand Down Expand Up @@ -220,7 +220,7 @@ To create a container and limit its resources to one vCPU and 8 GiB of RAM:
"source": {
"alias": "24.04",
"protocol": "simplestreams",
"server": "https://cloud-images.ubuntu.com/releases",
"server": "https://cloud-images.ubuntu.com/releases/",
"type": "image"
}
}'
Expand All @@ -247,7 +247,7 @@ To create a virtual machine on the cluster member `micro2`, enter the following
"source": {
"alias": "24.04",
"protocol": "simplestreams",
"server": "https://cloud-images.ubuntu.com/releases",
"server": "https://cloud-images.ubuntu.com/releases/",
"type": "image"
},
"type": "virtual-machine"
Expand Down Expand Up @@ -293,7 +293,7 @@ To create a container with this instance type:
"source": {
"alias": "24.04",
"protocol": "simplestreams",
"server": "https://cloud-images.ubuntu.com/releases",
"server": "https://cloud-images.ubuntu.com/releases/",
"type": "image"
}
}'
Expand Down
2 changes: 1 addition & 1 deletion doc/howto/instances_routed_nic_vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ To configure the gateways with `cloud-init`, firstly initialize an instance:
"source": {
"alias": "24.04",
"protocol": "simplestreams",
"server": "https://cloud-images.ubuntu.com/releases",
"server": "https://cloud-images.ubuntu.com/releases/",
"type": "image"
},
"type": "virtual-machine"
Expand Down
6 changes: 3 additions & 3 deletions doc/rest-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,7 @@ definitions:
x-go-name: Protocol
server:
description: URL of the source server
example: https://cloud-images.ubuntu.com/releases
example: https://cloud-images.ubuntu.com/releases/
type: string
x-go-name: Server
type: object
Expand Down Expand Up @@ -1336,7 +1336,7 @@ definitions:
x-go-name: Secret
server:
description: URL of the source server
example: https://cloud-images.ubuntu.com/releases
example: https://cloud-images.ubuntu.com/releases/
type: string
x-go-name: Server
type:
Expand Down Expand Up @@ -2370,7 +2370,7 @@ definitions:
x-go-name: Websockets
server:
description: Remote server URL (for remote images)
example: https://cloud-images.ubuntu.com/releases
example: https://cloud-images.ubuntu.com/releases/
type: string
x-go-name: Server
source:
Expand Down
4 changes: 2 additions & 2 deletions lxc/config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ var ImagesRemote = Remote{

// UbuntuRemote is the Ubuntu image server (over simplestreams).
var UbuntuRemote = Remote{
Addr: "https://cloud-images.ubuntu.com/releases",
Addr: "https://cloud-images.ubuntu.com/releases/",
Static: true,
Public: true,
Protocol: "simplestreams",
}

// UbuntuDailyRemote is the Ubuntu daily image server (over simplestreams).
var UbuntuDailyRemote = Remote{
Addr: "https://cloud-images.ubuntu.com/daily",
Addr: "https://cloud-images.ubuntu.com/daily/",
Static: true,
Public: true,
Protocol: "simplestreams",
Expand Down
2 changes: 1 addition & 1 deletion shared/api/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ type ImageSource struct {
Protocol string `json:"protocol" yaml:"protocol"`

// URL of the source server
// Example: https://cloud-images.ubuntu.com/releases
// Example: https://cloud-images.ubuntu.com/releases/
Server string `json:"server" yaml:"server"`

// Type of image (container or virtual-machine)
Expand Down
2 changes: 1 addition & 1 deletion shared/api/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ type InstanceSource struct {
Properties map[string]string `json:"properties,omitempty" yaml:"properties,omitempty"`

// Remote server URL (for remote images)
// Example: https://cloud-images.ubuntu.com/releases
// Example: https://cloud-images.ubuntu.com/releases/
Server string `json:"server,omitempty" yaml:"server,omitempty"`

// Remote server secret (for remote private images)
Expand Down
4 changes: 2 additions & 2 deletions test/suites/remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ test_remote_url() {

# Check that we can add simplestream remotes with valid certs without confirmation
if [ -z "${LXD_OFFLINE:-}" ]; then
lxc_remote remote add ubuntu1 https://cloud-images.ubuntu.com/releases --protocol=simplestreams
lxc_remote remote add ubuntu2 https://cloud-images.ubuntu.com:443/releases --protocol=simplestreams
lxc_remote remote add ubuntu1 https://cloud-images.ubuntu.com/releases/ --protocol=simplestreams
lxc_remote remote add ubuntu2 https://cloud-images.ubuntu.com:443/releases/ --protocol=simplestreams
lxc_remote remote remove ubuntu1
lxc_remote remote remove ubuntu2
fi
Expand Down
Loading