From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id 2F09E5A02F6 for ; Fri, 10 May 2024 19:03:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715360622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Wq1KLZtT39eEe4CV+vfxMfMcnzvGDNWQdqcYunNacSI=; b=JuP4mIvGMZ3YaQ3Z0rKn4LDeZhQCKcNqlg3DQo3DSQqJwxMg5g3wZxWwX/yiKnAN5liP// vsnjRANFhT8I/hE5Er9OOHSnndkwXmAmnQ+Y0KuBbfF9kso6RcwDbiy8YtM5X9pTstQJix PJVz1QBt2CFk5ACNWxNlQc32j/B4id4= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-660--sf3MqytM2WWBb4g0676UQ-1; Fri, 10 May 2024 13:03:40 -0400 X-MC-Unique: -sf3MqytM2WWBb4g0676UQ-1 Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-51f22618c20so2050017e87.0 for ; Fri, 10 May 2024 10:03:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715360618; x=1715965418; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Wq1KLZtT39eEe4CV+vfxMfMcnzvGDNWQdqcYunNacSI=; b=DwKpIVGldj5V9S44QWyB5n/BpHYKl+mWiRmlXhSpN1Qx6Rh1ti9FfZDffNUEC718RT lSKy6uvZ7xjXpWYPNsmA8Alm3XJAs0pnZ+oWQ/cnR16oL7g9Mw4Xn0usAYQycYr/wgkr BG0Hhv+R89S7LAxUKrEJulBmG+wPJEnZQ7hrqTduKY45tYg1jHdaqDJjCxN/on5+z5Fx pfhcxO9dnbwn5l/h/QJeONwr3l1sT1mTgRJKemhVYLCpIAh4VJnKp65DhuI5XoQB0DFq 4fvglKxnZJ/DzpBQS+nxVM46HL/n2mHzCpJ0Q4A+WWI9GInBk1/O/IUXwhxZ8m4r2BLJ qfQA== X-Gm-Message-State: AOJu0Yx2UMFHM9erpnnNSnjZTgfx9G3EYFD4TAf4JfHKYyc/uluv55FD +0bQxxSUMze+RL2sPyFLN5NgoeKXBogst9t8iQLvjkeDorLGCQCr6nfZaEdEtqRocSyi4ne+4e5 xnlyojG2YTJ9/Cat7ltga9Wi0PgSqwC8qMokNUf/dmFaa/Qj+9w4uXleuFRBzaTcdFV4b6gsHR8 J9HH+1CQm3079iSqBHopf1XKfQjTt0gT5xhuA= X-Received: by 2002:a19:f007:0:b0:518:9823:601a with SMTP id 2adb3069b0e04-5220fd7bd32mr2743030e87.39.1715360617559; Fri, 10 May 2024 10:03:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFHKxn7/NHDxtk5hi0tkn95KyEhp6kOLTmQQiAmJSgoNpN4ZliMzYWP4Cs0K7prRKHOr1vxwg== X-Received: by 2002:a19:f007:0:b0:518:9823:601a with SMTP id 2adb3069b0e04-5220fd7bd32mr2742983e87.39.1715360615800; Fri, 10 May 2024 10:03:35 -0700 (PDT) Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57359e84dc1sm603492a12.23.2024.05.10.10.03.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 May 2024 10:03:35 -0700 (PDT) Date: Fri, 10 May 2024 19:03:01 +0200 From: Stefano Brivio To: Danish Prakash Subject: Re: Setting hostname while spawning pasta Message-ID: <20240510190301.10528a96@elisabeth> In-Reply-To: References: Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.36; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: XKHSBZV7L5FFNYTTEISY37LQ6MSOJVKK X-Message-ID-Hash: XKHSBZV7L5FFNYTTEISY37LQ6MSOJVKK X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Hi Danish, On Thu, 9 May 2024 12:30:42 +0530 Danish Prakash 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