From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by passt.top (Postfix) with ESMTPS id DA3585A02CB for ; Mon, 13 May 2024 16:28:58 +0200 (CEST) Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-51f3a49ff7dso5784728e87.2 for ; Mon, 13 May 2024 07:28:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1715610538; x=1716215338; darn=passt.top; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=b/Tbl5wc7SnLp5Y9H6BF7jvXbDou8lTRvruxMcHlW7Y=; b=QJCgBjTW3bM2yYNOln1iqQ8FFNuM4+u7R8xUbjB/y8cFZ9cOWQQ+MSO6mBkxWbkpBy OLcVKJx+kkLrMCvWHXQwyJfNOm3qcxCKiiaWiQ8fnG7vMG0hRBGFn+4L4yMXamHmjDHz 2DU/uZJ4bA7+FROjRd4LmBlGqf1iO+XgZLtzLpWOvuBxdsHVVX7ZPLsR9pwWhsv2+1K7 i9QXh1E5dKl7F/l+prISbFOqURl8Lkpr8wR/rGolVshBvtiBB9tk8s877n+JwMbH/uSt HLYZJo15wy4h+ZQfZmbXgVFnCCNeXi7nqUEzltdBImLEVuBoCa7A0b+D041ZUyLSXIc+ 80Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715610538; x=1716215338; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=b/Tbl5wc7SnLp5Y9H6BF7jvXbDou8lTRvruxMcHlW7Y=; b=UvoLW2DVMxdoylIr/0lp0VEMy1Rnr0GU/bPio2mXU3h7dyBXnxPh7sSrRFz/mxhIhu Sy2NVQ+OwRBicrEeyfIgKhr6owD4ipPyuUsaiHWtC4xf0xLoVXyGmfhirwarB7xdPNRU HoJN0KGfI+kIK69AdJxbNoNQnxP9PInD3oCgEVq0iT351vt7L1RBdlBd8ABAkpiVoZXR MrbgqWdvti+oMjRGb2vN1oEzlKSLHHnD+RbfIRdtXPIiAf1JFi74iwx+Ewttu/KlHk/w +UbLH0W9E5LZxdmZAx78zj8yZ+d7XHRcszSjQiULphtKb62QehcdHe4fVmNWSRegmx5J yq0w== X-Gm-Message-State: AOJu0Yw3o+s2cq2VbrK2NiJ5GDWc2YYckwR7bmml09ReYLDIJMwTPdA4 sn5VUwn1JHyb8W3qiVlgKqQ3U7NzDAt+25g1PqC+drD9W4zTAhnKtllqlVsz2Y0oqQjzvsrFTPo jt6bMGnn2Mbmy2c+v1fIBXRNBVvZK8WwnZPmeaQ== X-Google-Smtp-Source: AGHT+IHux0h4RkFF/NOPVLt56PCoPQPP3MrH1wQlyu/mw08qJ+1RnWguD7SjfnA7AiSPha9yhRr8CmsO0DoEnJqcnqs= X-Received: by 2002:ac2:55a4:0:b0:521:533d:6367 with SMTP id 2adb3069b0e04-5221027bad5mr5425729e87.63.1715610537991; Mon, 13 May 2024 07:28:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Danish Prakash Date: Mon, 13 May 2024 19:58:31 +0530 Message-ID: Subject: Re: Setting hostname while spawning pasta To: Paul Holzinger Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-MailFrom: danish.prakash@suse.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation Message-ID-Hash: K667GFFV5XH4WF4XKMMFYUXP2Y5O6XMV X-Message-ID-Hash: K667GFFV5XH4WF4XKMMFYUXP2Y5O6XMV X-Mailman-Approved-At: Mon, 13 May 2024 20:19:08 +0200 CC: passt-dev@passt.top, Stefano Brivio 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: > I don't have an issue with the hostname suggestion but it will not solve > the problem of users not understanding that they are in a new user > namespace. Maybe a more universal solution is to print a log line with a > hint when no explicit command is given. Something like: "Spawning new > shell in user+network namespace". That at least tells the user what > pasta did and works even in cases where the prompt does not contain the > hostname That's a great suggestion but the reason I proposed modifying/setting the hostname was because it seemed to me a more subtle way to address this problem. However, printing to stdout doesn't help in situations where you're running pasta-in-pasta... as Stefano earlier pointed out. This solution of modifying and prefixing "pasta-" to the hostname works nicely in this case while also acting as a subtle indication that *something* has changed, not leaving the user entirely clueless. danishpraka.sh :wq On Mon, May 13, 2024 at 5:29=E2=80=AFPM Paul Holzinger wrote: > > Hi, > > On 09/05/2024 09:00, 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 tha= t 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. > > > > Thank you > > > > danishpraka.sh > > :wq > > > I don't have an issue with the hostname suggestion but it will not solve > the problem of users not understanding that they are in a new user > namespace. Maybe a more universal solution is to print a log line with a > hint when no explicit command is given. Something like: "Spawning new > shell in user+network namespace". That at least tells the user what > pasta did and works even in cases where the prompt does not contain the > hostname. > > Paul >