diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 68debc471a1..463dcdd1c35 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -33,10 +33,19 @@ body: description: If your bug produces a backtrace, please include it here. render: shell - type: textarea - id: logs + id: layer-logs attributes: - label: Relevant Logs - description: If possible, reproduce the bug with the envrionment variable RUST_LOG set to 'trace', and attach the printed logs + label: mirrord layer logs + description: If possible, reproduce the bug with the environment variable RUST_LOG set to 'trace', and attach the printed logs. + render: shell + - type: textarea + id: intproxy-logs + attributes: + label: Internal proxy logs + description: | + Please attach the relevant `mirrord-intproxy` logs. You can find them in your `/tmp` directory (by default). + The default log file looks like `/tmp/mirrord-intproxy-1727386366-5rqqf2x`. + You can change this default with the `internal_proxy.log_destination` mirrord config. render: shell - type: input id: os_version diff --git a/changelog.d/2750.changed.md b/changelog.d/2750.changed.md index 45aff52cd45..554b588b567 100644 --- a/changelog.d/2750.changed.md +++ b/changelog.d/2750.changed.md @@ -1 +1,2 @@ +Prompt user for intproxy logs (when intproxy crashes). Adds .log as a file type for intproxy default log file. \ No newline at end of file diff --git a/mirrord/layer/src/error.rs b/mirrord/layer/src/error.rs index 87da012bd83..5bd0dd1b062 100644 --- a/mirrord/layer/src/error.rs +++ b/mirrord/layer/src/error.rs @@ -226,8 +226,16 @@ impl From for i64 { } HookError::ProxyError(ref err) => { graceful_exit!( - "Proxy error, connectivity issue or a bug. \n\ - You may report it to us on https://github.com/metalbear-co/mirrord/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml \n{err}" + r"Proxy error, connectivity issue or a bug. + Please report it to us on https://github.com/metalbear-co/mirrord/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml + You can find the `mirrord-intproxy` logs in {}. + {err}", + crate::setup() + .layer_config() + .internal_proxy + .log_destination + .clone() + .unwrap_or("/tmp".to_string()) ) } _ => error!("Error occured in Layer >> {fail:?}"), diff --git a/mirrord/layer/src/setup.rs b/mirrord/layer/src/setup.rs index eafca7b931e..1c4dba37401 100644 --- a/mirrord/layer/src/setup.rs +++ b/mirrord/layer/src/setup.rs @@ -93,6 +93,10 @@ impl LayerSetup { } } + pub fn layer_config(&self) -> &LayerConfig { + &self.config + } + pub fn env_config(&self) -> &EnvConfig { &self.config.feature.env }