* [gentoo-user] Getting tar to keep going
@ 2024-11-05 15:38 Peter Humphrey
2024-11-05 16:27 ` Grant Taylor
0 siblings, 1 reply; 9+ messages in thread
From: Peter Humphrey @ 2024-11-05 15:38 UTC (permalink / raw
To: gentoo-user
Greetings.
The Network Manager man page says to 'chattr +i /etc/resolv.conf', so I did,
and that one move enabled the wireless network to work as it should.
Now I find it causes a problem when restoring a backup: tar fails in restoring
that file, of course, and reports an error. The number of files restored is less
than expected, so I assume that tar stops restoring and just continues to spin
through the rest of the tarball without doing anything. Is that right?
I've tried setting the options --ignore-command-error and --ignore-failed-
read, separately, but with no effect.
Is there a way to tell tar to 'keep going', as with portage? If not, I'm going
to have to mess about with 'chattr [+/-]i' with all the opportunities that has
for error. I don't need any more of those, thank-you-very-much!
--
Regards,
Peter.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Getting tar to keep going
2024-11-05 15:38 [gentoo-user] Getting tar to keep going Peter Humphrey
@ 2024-11-05 16:27 ` Grant Taylor
2024-11-05 16:55 ` Peter Humphrey
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Grant Taylor @ 2024-11-05 16:27 UTC (permalink / raw
To: gentoo-user
On 11/5/24 9:38 AM, Peter Humphrey wrote:
> The Network Manager man page says to 'chattr +i /etc/resolv.conf',
> so I did, and that one move enabled the wireless network to work as
> it should.
What?!?!?! Network Manager can't be made to keep it's hands off of
/etc/resolv.conf so the workaround is to leverage file system features
to break Network Manager's hands when it tries to touch the file?
That's a hell of a bad design in my opinion.
The tar error will be related to the restore / write to disk, not
reading from ""tape or command error.
You might explore an option to cause tar to exclude /etc/resolv.conf
from the restore job. I'm not sure what that would look like as I'm
usually only messing with exclude during backups.
You might be able to mess with some even more esoteric (bind) mount
options, but that will be quite similar to the chattr dance.
I'd go smack Network Manager with a bigger bat.
--
Grant. . . .
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Getting tar to keep going
2024-11-05 16:27 ` Grant Taylor
@ 2024-11-05 16:55 ` Peter Humphrey
2024-11-05 18:11 ` Dale
2024-11-05 18:25 ` Eli Schwartz
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Peter Humphrey @ 2024-11-05 16:55 UTC (permalink / raw
To: gentoo-user
On Tuesday 5 November 2024 16:27:57 GMT Grant Taylor wrote:
> On 11/5/24 9:38 AM, Peter Humphrey wrote:
> > The Network Manager man page says to 'chattr +i /etc/resolv.conf',
> > so I did, and that one move enabled the wireless network to work as
> > it should.
>
> What?!?!?! Network Manager can't be made to keep it's hands off of
> /etc/resolv.conf so the workaround is to leverage file system features
> to break Network Manager's hands when it tries to touch the file?
>
> That's a hell of a bad design in my opinion.
Yes, I thought it might raise a laugh...
> The tar error will be related to the restore / write to disk, not
> reading from ""tape or command error.
I see what you mean: in my case, tar needs an --ignore-failed-write option.
> You might explore an option to cause tar to exclude /etc/resolv.conf
> from the restore job. I'm not sure what that would look like as I'm
> usually only messing with exclude during backups.
There is an --exclude option; I can use that.
> You might be able to mess with some even more esoteric (bind) mount
> options, but that will be quite similar to the chattr dance.
>
> I'd go smack Network Manager with a bigger bat.
I'll hold your coat... :)
--
Regards,
Peter.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Getting tar to keep going
2024-11-05 16:55 ` Peter Humphrey
@ 2024-11-05 18:11 ` Dale
0 siblings, 0 replies; 9+ messages in thread
From: Dale @ 2024-11-05 18:11 UTC (permalink / raw
To: gentoo-user
Peter Humphrey wrote:
> On Tuesday 5 November 2024 16:27:57 GMT Grant Taylor wrote:
>> On 11/5/24 9:38 AM, Peter Humphrey wrote:
>>> The Network Manager man page says to 'chattr +i /etc/resolv.conf',
>>> so I did, and that one move enabled the wireless network to work as
>>> it should.
>> What?!?!?! Network Manager can't be made to keep it's hands off of
>> /etc/resolv.conf so the workaround is to leverage file system features
>> to break Network Manager's hands when it tries to touch the file?
>>
>> That's a hell of a bad design in my opinion.
> Yes, I thought it might raise a laugh...
>
>> The tar error will be related to the restore / write to disk, not
>> reading from ""tape or command error.
> I see what you mean: in my case, tar needs an --ignore-failed-write option.
>
>> You might explore an option to cause tar to exclude /etc/resolv.conf
>> from the restore job. I'm not sure what that would look like as I'm
>> usually only messing with exclude during backups.
> There is an --exclude option; I can use that.
>
>> You might be able to mess with some even more esoteric (bind) mount
>> options, but that will be quite similar to the chattr dance.
>>
>> I'd go smack Network Manager with a bigger bat.
> I'll hold your coat... :)
>
With my VPN, I needed certain entries in that file. Thing is, other
stuff kept changing it. I used the resolv.conf.head and tail file to
force it to do it my way and still work when the VPN is down. This may
or may not be a option for you. If it is, then maybe that will help if
you don't want to have issues with backups/copying etc.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Getting tar to keep going
2024-11-05 16:27 ` Grant Taylor
2024-11-05 16:55 ` Peter Humphrey
@ 2024-11-05 18:25 ` Eli Schwartz
2024-11-05 22:23 ` Arsen Arsenović
2024-11-05 23:41 ` Grant Taylor
3 siblings, 0 replies; 9+ messages in thread
From: Eli Schwartz @ 2024-11-05 18:25 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1.1: Type: text/plain, Size: 1414 bytes --]
On 11/5/24 11:27 AM, Grant Taylor wrote:
> On 11/5/24 9:38 AM, Peter Humphrey wrote:
>> The Network Manager man page says to 'chattr +i /etc/resolv.conf', so
>> I did, and that one move enabled the wireless network to work as it
>> should.
>
> What?!?!?! Network Manager can't be made to keep it's hands off of /
> etc/resolv.conf so the workaround is to leverage file system features to
> break Network Manager's hands when it tries to touch the file?
>
> That's a hell of a bad design in my opinion.
Yeah, and it's also nonsense as far as I can tell. Here's what the man
page for Network Manager actually says:
dns
Set the DNS processing mode.
none: NetworkManager will not modify resolv.conf. This implies
rc-manager unmanaged
rc-manager
Set the resolv.conf management mode. This option is about how
NetworkManager writes to /etc/resolv.conf, if at all.
If you configure dns=none or make /etc/resolv.conf immutable
with chattr +i, NetworkManager will ignore this setting and
always choose unmanaged (below).
symlink: If /etc/resolv.conf is a regular file or does not
exist, NetworkManager will write the file directly.
file: NetworkManager will write /etc/resolv.conf as regular
file.
unmanaged: don't touch /etc/resolv.conf.
--
Eli Schwartz
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Getting tar to keep going
2024-11-05 16:27 ` Grant Taylor
2024-11-05 16:55 ` Peter Humphrey
2024-11-05 18:25 ` Eli Schwartz
@ 2024-11-05 22:23 ` Arsen Arsenović
2024-11-05 23:41 ` Grant Taylor
3 siblings, 0 replies; 9+ messages in thread
From: Arsen Arsenović @ 2024-11-05 22:23 UTC (permalink / raw
To: Grant Taylor; +Cc: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2794 bytes --]
Grant Taylor <gtaylor@gentoo.tnetconsulting.net> writes:
> On 11/5/24 9:38 AM, Peter Humphrey wrote:
>> The Network Manager man page says to 'chattr +i /etc/resolv.conf', so I did,
>> and that one move enabled the wireless network to work as it should.
>
> What?!?!?! Network Manager can't be made to keep it's hands off of
> /etc/resolv.conf so the workaround is to leverage file system features to break
> Network Manager's hands when it tries to touch the file?
https://www.networkmanager.dev/docs/api/latest/NetworkManager.conf.html
under the dns key in the main section:
> none: NetworkManager will not modify resolv.conf. This implies
> rc-manager unmanaged
FOTM, doing a FTS over all manuals (which is slow because man-pages are
awful):
~$ man -K chattr
--Man-- next: rm(1) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: ostree-prepare-root(1) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: chattr(1) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: systemd-dissect(1) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: socat1(1) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: btrfs-property(8) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: utime(2) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: ioctl_iflags(2) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: fallocate(2) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: statx(2) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: utimensat(2) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: mount(2) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: archive_read_disk(3) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: archive_write_disk(3) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: ext3(5) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: tmpfiles.d(5) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: sysupdate.d(5) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: nm-system-settings.conf(5) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: slapd-relay(5) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: slapo-rwm(5) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: slapd-meta(5) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: btrfs(5) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
nm-system-settings.conf says:
> If you configure dns=none or make /etc/resolv.conf immutable with
> chattr +i, NetworkManager will ignore this setting and always choose
> unmanaged (below).
so, certainly not what was said above..
--
Arsen Arsenović
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 251 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Getting tar to keep going
2024-11-05 16:27 ` Grant Taylor
` (2 preceding siblings ...)
2024-11-05 22:23 ` Arsen Arsenović
@ 2024-11-05 23:41 ` Grant Taylor
2024-11-06 0:08 ` Eli Schwartz
3 siblings, 1 reply; 9+ messages in thread
From: Grant Taylor @ 2024-11-05 23:41 UTC (permalink / raw
To: gentoo-user
On 11/5/24 10:27 AM, Grant Taylor wrote:
> What?!?!?! Network Manager can't be made to keep it's hands off of
> /etc/resolv.conf so the workaround is to leverage file system features
> to break Network Manager's hands when it tries to touch the file?
Clarifying, after some replies that I've seen.
I was surprised by, and doubted, the idea that Network Manager might not
be able to be configured to leave /etc/resolv.conf alone.
I assumed that Network Manager can be configured to leave
/etc/resolv.conf alone.
As such, I'd think it is better to configure Network Manager to leave
/etc/resolv.conf alone and not fall back to something like setting the
immutable attribute on the file to prevent it being messed with.
--
Grant. . . .
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Getting tar to keep going
2024-11-05 23:41 ` Grant Taylor
@ 2024-11-06 0:08 ` Eli Schwartz
2024-11-06 2:11 ` Peter Humphrey
0 siblings, 1 reply; 9+ messages in thread
From: Eli Schwartz @ 2024-11-06 0:08 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1.1: Type: text/plain, Size: 819 bytes --]
On 11/5/24 6:41 PM, Grant Taylor wrote:
> Clarifying, after some replies that I've seen.
>
> I was surprised by, and doubted, the idea that Network Manager might not
> be able to be configured to leave /etc/resolv.conf alone.
Oops, yeah, sorry. My reply was badly worded -- I responded to your post
because your post included that shock and skepticism which was a good
lead-in to my quote of the actual manual.
I 100% agree with you that it doesn't sound like the way things would
actually work.
But my reply was really intended for Peter. I don't quite understand
what Peter read (when saying "the Network Manager man page says to
chattr") to overlook the fact that the manpage is fairly clear in the
only place it talks about chattr, that chattr is not your only option.
--
Eli Schwartz
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Getting tar to keep going
2024-11-06 0:08 ` Eli Schwartz
@ 2024-11-06 2:11 ` Peter Humphrey
0 siblings, 0 replies; 9+ messages in thread
From: Peter Humphrey @ 2024-11-06 2:11 UTC (permalink / raw
To: gentoo-user
On Wednesday 6 November 2024 00:08:12 GMT Eli Schwartz wrote:
> But my reply was really intended for Peter. I don't quite understand
> what Peter read (when saying "the Network Manager man page says to
> chattr") to overlook the fact that the manpage is fairly clear in the
> only place it talks about chattr, that chattr is not your only option.
I didn't just make it up. I did actually read it; I was sure it was in the man
page, but it seems I was mistaken.
Back to the drawing-board then, but with a better idea of what to do.
Thanks all for dragging me back to reality. ;)
--
Regards,
Peter.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-11-06 2:12 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-05 15:38 [gentoo-user] Getting tar to keep going Peter Humphrey
2024-11-05 16:27 ` Grant Taylor
2024-11-05 16:55 ` Peter Humphrey
2024-11-05 18:11 ` Dale
2024-11-05 18:25 ` Eli Schwartz
2024-11-05 22:23 ` Arsen Arsenović
2024-11-05 23:41 ` Grant Taylor
2024-11-06 0:08 ` Eli Schwartz
2024-11-06 2:11 ` Peter Humphrey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox