On 09/19/2019 06:18 PM, Kairui Song wrote:
On Tue, Sep 17, 2019 at 2:18 PM Pingfan Liu <piliu(a)redhat.com>
wrote:
>
> Print some message during the long wait period to reflect the process.
> The message will look like:
> try harder to connect the server, maybe another 3mins
> ...
>
> Signed-off-by: Pingfan Liu <piliu(a)redhat.com>
> ---
> kdumpctl | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/kdumpctl b/kdumpctl
> index f75b820..3d9373f 100755
> --- a/kdumpctl
> +++ b/kdumpctl
> @@ -736,6 +736,7 @@ check_ssh_config()
> check_and_wait_network_ready()
> {
> local start_time=$(date +%s)
> + local warn_once=1
> local cur
> local diff
> local retval
> @@ -760,6 +761,12 @@ check_and_wait_network_ready()
> return 1
> fi
>
> + if [ $warn_once -eq 1 ]; then
> + echo "try harder to connect the server, maybe another
3mins"
This message looks a bit confusing to me... Can it give a more
It is hard to tell
the left time due to the timeout of each iteration of
ssh may vary. So here it just promotes waiting at the first try. For the
rest tries, it just print "."
concrete estimation of how long it might wait? And maybe say
"Network
dump target is not usable, waiting for it to be ready" or something
OK, this
message sounds better.
Thanks,
Pingfan
> more detail like this will be better?
>
>> + warn_once=0
>> + fi
>> + echo -n .
>> +
>> cur=$(date +%s)
>> let "diff = $cur - $start_time"
>> # 60s time out
>> --
>> 2.7.5
>>
>
>