public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Danish Prakash <danish.prakash@suse.com>
Cc: passt-dev@passt.top
Subject: Re: Setting hostname while spawning pasta
Date: Fri, 10 May 2024 19:03:01 +0200	[thread overview]
Message-ID: <20240510190301.10528a96@elisabeth> (raw)
In-Reply-To: <CACVuxaYdEec0mi_11GHJVoS1a_WJV=VW6LjnAMyEEP7xzPqKkA@mail.gmail.com>

Hi Danish,

On Thu, 9 May 2024 12:30:42 +0530
Danish Prakash <danish.prakash@suse.com> wrote:

> Hello
> 
> I was having a discussion with a colleague of mine on how `pasta` when invoked
> independently drops you in a new user and network namespace and how that causes
> some folks to not realize what has happened especially because there's no cue
> as to what transpired. This is not uncommon though, because a lot of
> times, folks having
> issues with pasta while running it with podman, tend to invoke pasta
> directly to debug.
> 
> I interacted with Stefano regarding this and he told me that pasta
> already detaches
> the UTS namespace and so in order to address this issue, I propose
> that we set the hostname
> as part of `pasta_spawn_cmd()`.Doing this would provide users with a
> clear visual indication that
> they are in a new user namespace (among other ns but that won't be
> indicative here) and avoid
> issues similar to the aforementioned.
> 
> I'm looking to gather more opinions on how this change, if
> implemented, would affect the
> functionality. Looking forward to the discussion.

...I just realised one thing, probably solvable, while trying out some
stuff with pasta on two different machines: if I didn't have the
original hostname in the prompt, I would have had some issues telling
them apart.

But we could still retain the existing hostname and prefix with
something like 'pasta-on-' (sure, we would need to truncate at 63
characters, but it shouldn't be a common case). What do you think?

That would also help when you're running pasta-in-pasta-in-pasta-in...
(or at least when I am running it ;)).

Because usually I notice that I'm in a pasta-spawned terminal by
looking at the prompt: I'm "root", but colours didn't change.

What I can't tell from the prompt, though, is at what "level" I'm at
(at least pasta-in-pasta is something I try very commonly to reproduce
pasta's behaviour with particular network setups). Having
root@pasta-on-pasta-on-machine would be a nice plus.

-- 
Stefano


  reply	other threads:[~2024-05-10 17:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-09  7:00 Setting hostname while spawning pasta Danish Prakash
2024-05-10 17:03 ` Stefano Brivio [this message]
     [not found]   ` <CACVuxaZEos=JK3XaFGM7d9z+qk-QLeChh7HuGxcdaEfmM02ywg@mail.gmail.com>
2024-05-13 11:21     ` Stefano Brivio
2024-05-13 11:56       ` Danish Prakash
2024-05-13 11:59 ` Paul Holzinger
2024-05-13 14:28   ` Danish Prakash
2024-05-13 16:02   ` Stefano Brivio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240510190301.10528a96@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=danish.prakash@suse.com \
    --cc=passt-dev@passt.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).