Skip to content

Commit

Permalink
Merge branch 'main' into remove-waitlist
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalb181 authored Dec 21, 2023
2 parents 253dcf5 + e39043d commit f9863ab
Show file tree
Hide file tree
Showing 15 changed files with 236 additions and 165 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) and the chang

<!-- towncrier release notes start -->

## [3.78.2](https://github.com/metalbear-co/mirrord/tree/3.78.2) - 2023-12-14


### Fixed

- Fixed config verification in IDE context when the config does not specify the
target but uses the `scale_down` feature.


## [3.78.1](https://github.com/metalbear-co/mirrord/tree/3.78.1) - 2023-12-13


Expand Down
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,22 @@ To use mirrord console, run it:
Then run mirrord with the environment variable:
`MIRRORD_CONSOLE_ADDR=127.0.0.1:11233`

## Debugging the Internal Proxy (`intproxy`)

To see logs from the internal proxy, use the [mirrord console](#mirrord-console).

To debug it with a debugger:

1. Add
```Rust
tokio::time::sleep(Duration::from_secs(20)).await;
```
to [somewhere](https://github.com/metalbear-co/mirrord/blob/fa2af7f1e77a9254fb0908be40b0dae5da53d298/mirrord/cli/src/internal_proxy.rs#L145) in the start of the intproxy code.
2. Set breakpoints in vscode in the relevant lines of the intproxy code.
3. Build mirrord.
4. Run mirrord.
5. Attach a debugger in vscode to the inproxy process. On macOS you can do that with `Cmd` + `Shift` + `P` -> `LLDB: Attach to Process...` -> type `intproxy` and choose the `mirrord intproxy` process. The sleep you added at the start of the intproxy is time for you to attach the debugger.

## Retrieving Agent Logs

By default, the agent's pod will complete and disappear shortly after the agent exits. In order to be able to retrieve
Expand Down
65 changes: 38 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ resolver = "2"

# latest commits on rustls suppress certificate verification
[workspace.package]
version = "3.78.1"
version = "3.78.2"
edition = "2021"
license = "MIT"
readme = "README.md"
Expand Down
1 change: 1 addition & 0 deletions changelog.d/+intproxy-debug-guide.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Debug instructions for intproxy in contributer guide.
1 change: 0 additions & 1 deletion changelog.d/+scale-down-ide.fixed.md

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/+support-new-crio.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove support for old cri-o, use new CRI API (v1)
1 change: 1 addition & 0 deletions changelog.d/2099.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Uses the `syscalls` crate to handle calling the syscalls for go. And adds `pwrite64`, `pread64`, `fsync` and `fdatasync` hooks for go.
2 changes: 1 addition & 1 deletion mirrord/agent/src/runtime/crio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use http::{Request, Response};
use http_body_util::{BodyExt, Empty};
use hyper::{body::Incoming, client::conn};
use hyper_util::rt::TokioIo;
use k8s_cri::v1alpha2::{runtime_service_client::RuntimeServiceClient, ContainerStatusRequest};
use k8s_cri::v1::{runtime_service_client::RuntimeServiceClient, ContainerStatusRequest};
use serde::Deserialize;
use tokio::net::UnixStream;
use tonic::transport::{Endpoint, Uri};
Expand Down
1 change: 1 addition & 0 deletions mirrord/layer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ bimap.workspace = true
dashmap = "5.4"
hashbrown = "0.14"
exec.workspace = true
syscalls = { version = "0.6", features = ["full"] }

[target.'cfg(target_os = "macos")'.dependencies]
mirrord-sip = { path = "../sip" }
Expand Down
Loading

0 comments on commit f9863ab

Please sign in to comment.