Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 May 2018 01:05:16 +0800
From:      Julian Elischer <julian@freebsd.org>
To:        "Rodney W. Grimes" <freebsd-rwg@pdx.rh.CN85.dnsmgr.net>
Cc:        "freebsd-ipfw@freebsd.org" <Freebsd-ipfw@freebsd.org>
Subject:   Re: removing some error states
Message-ID:  <81ced915-4dae-26c0-bc43-5ff5299d00d0@freebsd.org>
In-Reply-To: <201805011503.w41F3PxP026423@pdx.rh.CN85.dnsmgr.net>
References:  <201805011503.w41F3PxP026423@pdx.rh.CN85.dnsmgr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1/5/18 11:03 pm, Rodney W. Grimes wrote:
>> Many years ago I added code to ipfw so that if -q was set it would not
>> complain about
>> things that were unimportant, nor would it return an error code.
>> Such things include removing table entries that are already gone and
>> similar sorts of 'safe' operations.
>> The idea is that you can write 'naive' scripts that don't need to do
>> complicated checks to see if XXX is already present or gone..
>> In hte ame way that rm -f doesn't complain if the file doesn't
>> exist..? You were going to delete it anyhow.
>>
>>
>> I'd like that to continue to some of the new additions.
>> for example the terribly annoying
>>   ??? ipfw: DEPRECATED: inserting data into non-existent table 18.
>> (auto-created) (who cares?)
>>
>> and
>>
>>   ?? ljcc-78# ipfw table 19 create
>>   ???? ipfw: Table creation failed: File exists
>>
>> As the script needs to run multiple times, I don't care if the table
>> already exists.
>> but I do care about other errors.
>> I don't want to have to write special wrapper code for table create
>> that is different
>> from the wrappers elsewhere because it has to look for return code 71
>> and disregard it.
>> Can we just have -q continue to ignore such errors please?
> I think there is a bigger question here, why was auto table creation
> with first insert "Deprecated" at all?   This to me just seems like
> change cause someone could change it that has no usefull purpose or
> is there some great purpose this serves?
>
> Same with creation of an already existing file, why did that need
> to become a noisy warning/error?
>
Well ther eis an argument (that I disagree with in this case) that any 
unexected even is an error..

Also the new tables can have many different key type and indexing 
algorithms, which need to beĀ  declared up front.

but I don't see that raising a fatal error for trying to delete 
something that doesn't exist or make something that already exists 
really helps much other than to make scripts more complicated. That's 
why I made it optional before.. Removing table entries that are not 
present could be an error you want to know about, but probably it isn't.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?81ced915-4dae-26c0-bc43-5ff5299d00d0>