Skip to content

Commit

Permalink
Removing constrain that makes no sense in general case (#4611)
Browse files Browse the repository at this point in the history
  • Loading branch information
huguesBouvier authored Mar 17, 2021
1 parent 8af0fe8 commit 168a79c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions edgelet/iotedge/src/check/checks/hostname.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,12 @@ impl Hostname {
//
// Instead, we punt on this check and assume that everything's fine if config_hostname is identical to the device hostname,
// or starts with it.
if config_hostname != machine_hostname
&& !config_hostname.starts_with(&format!("{}.", machine_hostname))
//
// Azure FQDN don't support capital letter so we lower case the hostname before doing the check.
if config_hostname.to_lowercase() != machine_hostname.to_lowercase()
&& !config_hostname
.to_lowercase()
.starts_with(&format!("{}.", machine_hostname.to_lowercase()))
{
return Err(Context::new(format!(
"configuration has hostname {} but device reports hostname {}.\n\
Expand Down

0 comments on commit 168a79c

Please sign in to comment.