feat: support specify the schedulerClusterID in host config and carry… (#1240)
feat: support specify the schedulerClusterID in host config and carry it when listing schedulers Signed-off-by: chlins <chlins.zhang@gmail.com>
This commit is contained in:
parent
aedbc2ceb0
commit
e53ed3411c
|
|
@ -26,6 +26,8 @@ jobs:
|
||||||
|
|
||||||
- name: Install Protoc
|
- name: Install Protoc
|
||||||
uses: arduino/setup-protoc@v2
|
uses: arduino/setup-protoc@v2
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.GH_TOKEN }}
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
@ -55,6 +57,8 @@ jobs:
|
||||||
|
|
||||||
- name: Install Protoc
|
- name: Install Protoc
|
||||||
uses: arduino/setup-protoc@v2
|
uses: arduino/setup-protoc@v2
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.GH_TOKEN }}
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
|
||||||
|
|
@ -15,13 +15,15 @@ jobs:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Rust cache
|
- name: Rust cache
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
cache-on-failure: true
|
cache-on-failure: true
|
||||||
|
|
||||||
- name: Install Protoc
|
- name: Install Protoc
|
||||||
uses: arduino/setup-protoc@v2
|
uses: arduino/setup-protoc@v2
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.GH_TOKEN }}
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
|
||||||
|
|
@ -939,9 +939,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dragonfly-api"
|
name = "dragonfly-api"
|
||||||
version = "2.1.43"
|
version = "2.1.44"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9776abc6461282d9c62e3b10fb499ad35b79163070672ca6d277b51819bb5712"
|
checksum = "76ef86d60ca52c206d9e4a7ae057d1451dacfc69d49421a6d28d6ae6723c4d79"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"prost 0.13.5",
|
"prost 0.13.5",
|
||||||
"prost-types 0.14.1",
|
"prost-types 0.14.1",
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ dragonfly-client-storage = { path = "dragonfly-client-storage", version = "1.0.3
|
||||||
dragonfly-client-backend = { path = "dragonfly-client-backend", version = "1.0.3" }
|
dragonfly-client-backend = { path = "dragonfly-client-backend", version = "1.0.3" }
|
||||||
dragonfly-client-util = { path = "dragonfly-client-util", version = "1.0.3" }
|
dragonfly-client-util = { path = "dragonfly-client-util", version = "1.0.3" }
|
||||||
dragonfly-client-init = { path = "dragonfly-client-init", version = "1.0.3" }
|
dragonfly-client-init = { path = "dragonfly-client-init", version = "1.0.3" }
|
||||||
dragonfly-api = "=2.1.43"
|
dragonfly-api = "=2.1.44"
|
||||||
thiserror = "2.0"
|
thiserror = "2.0"
|
||||||
futures = "0.3.31"
|
futures = "0.3.31"
|
||||||
reqwest = { version = "0.12.4", features = [
|
reqwest = { version = "0.12.4", features = [
|
||||||
|
|
|
||||||
|
|
@ -413,6 +413,11 @@ pub struct Host {
|
||||||
|
|
||||||
/// ip is the advertise ip of the host.
|
/// ip is the advertise ip of the host.
|
||||||
pub ip: Option<IpAddr>,
|
pub ip: Option<IpAddr>,
|
||||||
|
|
||||||
|
/// scheduler_cluster_id is the ID of the cluster to which the scheduler belongs.
|
||||||
|
/// NOTE: This field is used to identify the cluster to which the scheduler belongs.
|
||||||
|
/// If this flag is set, the idc, location, hostname and ip will be ignored when listing schedulers.
|
||||||
|
pub scheduler_cluster_id: Option<u64>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Host implements Default.
|
/// Host implements Default.
|
||||||
|
|
@ -423,6 +428,7 @@ impl Default for Host {
|
||||||
location: None,
|
location: None,
|
||||||
hostname: default_host_hostname(),
|
hostname: default_host_hostname(),
|
||||||
ip: None,
|
ip: None,
|
||||||
|
scheduler_cluster_id: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1035,9 +1041,9 @@ pub struct Storage {
|
||||||
/// | | -- Partial -->| Cache | |
|
/// | | -- Partial -->| Cache | |
|
||||||
/// | | | +-----------+ |
|
/// | | | +-----------+ |
|
||||||
/// | v | | | |
|
/// | v | | | |
|
||||||
/// | Download | Miss | |
|
/// | Download | Miss | |
|
||||||
/// | Task -->| | --- Hit ------>|<-- 2.Download
|
/// | Task -->| | --- Hit ------>|<-- 2.Download
|
||||||
/// | | | ^ |
|
/// | | | ^ |
|
||||||
/// | | v | |
|
/// | | v | |
|
||||||
/// | | +-----------+ | |
|
/// | | +-----------+ | |
|
||||||
/// | -- Full -->| Disk |---------- |
|
/// | -- Full -->| Disk |---------- |
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,7 @@ impl Dynconfig {
|
||||||
location: self.config.host.location.clone(),
|
location: self.config.host.location.clone(),
|
||||||
version: CARGO_PKG_VERSION.to_string(),
|
version: CARGO_PKG_VERSION.to_string(),
|
||||||
commit: GIT_COMMIT_SHORT_HASH.to_string(),
|
commit: GIT_COMMIT_SHORT_HASH.to_string(),
|
||||||
|
scheduler_cluster_id: self.config.host.scheduler_cluster_id.unwrap_or(0),
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue