diff --git a/src/providers/azure/mod.rs b/src/providers/azure/mod.rs index 7815da6c..e158a96b 100644 --- a/src/providers/azure/mod.rs +++ b/src/providers/azure/mod.rs @@ -30,6 +30,7 @@ use crate::errors::*; use crate::network; use crate::providers::MetadataProvider; use crate::retry; +use nix::unistd::Uid; #[cfg(test)] mod mock_tests; @@ -216,7 +217,15 @@ impl Azure { // make sure the metadata service is compatible with our version azure .is_fabric_compatible(MS_VERSION) - .chain_err(|| "failed version compatibility check")?; + .map_err(|_| { + let user = Uid::current(); + let root_or_not = Uid::is_root(user); + if !root_or_not { + warn!("unable to reach Azure endpoints, please check whether firewall rules are blocking access to them"); + } + + "failed to get shared configuration: not found" + })?; // populate goalstate azure.goal_state = azure.get_goal_state()?;