[ovs-dev,ovn] automake.mk: Use PYTHON3 to generate the ovn-ic-{n, sb} pics
diff mbox series

Message ID 73911530584e0844d7c76fbbdd7156aa4ef5e581.1582048241.git.tredaelli@redhat.com
State New
Headers show
Series
  • [ovs-dev,ovn] automake.mk: Use PYTHON3 to generate the ovn-ic-{n, sb} pics
Related show

Commit Message

Timothy Redaelli Feb. 18, 2020, 5:53 p.m. UTC
Currently $(PYTHON) is used in order to launch dot2pic script to generate
the diagram, but this is wrong since PYTHON variable is NOT defined by
the build system and so it fails when "python" binary doesn't exists
(like on RHEL8).

This commit fixes this by using the correct PYTHON3 variable that is
defined by the build system (in OVN_CHECK_PYTHON3).

Fixes: 2992f74bf515 ("ovn-ic-nb: Interconnection northbound DB schema and CLI.")
Fixes: 1c3c4108e602 ("ovn-ic-sb: Interconnection southbound DB schema and CLI.")
Cc: hzhou@ovn.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
---
 automake.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Mark Michelson Feb. 18, 2020, 6:44 p.m. UTC | #1
Hi Timothy,

It looks like some wires got crossed here. commit ff39e6c5 from James 
Page fixed this in master, but the fix was not backported to the 20.03 
branch. I'm going to backport the existing commit to 20.03.

On 2/18/20 12:53 PM, Timothy Redaelli wrote:
> Currently $(PYTHON) is used in order to launch dot2pic script to generate
> the diagram, but this is wrong since PYTHON variable is NOT defined by
> the build system and so it fails when "python" binary doesn't exists
> (like on RHEL8).
> 
> This commit fixes this by using the correct PYTHON3 variable that is
> defined by the build system (in OVN_CHECK_PYTHON3).
> 
> Fixes: 2992f74bf515 ("ovn-ic-nb: Interconnection northbound DB schema and CLI.")
> Fixes: 1c3c4108e602 ("ovn-ic-sb: Interconnection southbound DB schema and CLI.")
> Cc: hzhou@ovn.org
> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> ---
>   automake.mk | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/automake.mk b/automake.mk
> index 2b0bb4b12..a7947a3f5 100644
> --- a/automake.mk
> +++ b/automake.mk
> @@ -70,7 +70,7 @@ if HAVE_DOT
>   ovn-ic-nb.gv: ${OVSDIR}/ovsdb/ovsdb-dot.in $(srcdir)/ovn-ic-nb.ovsschema
>   	$(AM_V_GEN)$(OVSDB_DOT) --no-arrows $(srcdir)/ovn-ic-nb.ovsschema > $@
>   ovn-ic-nb.pic: ovn-ic-nb.gv ${OVSDIR}/ovsdb/dot2pic
> -	$(AM_V_GEN)(dot -T plain < ovn-ic-nb.gv | $(PYTHON) ${OVSDIR}/ovsdb/dot2pic -f 3) > $@.tmp && \
> +	$(AM_V_GEN)(dot -T plain < ovn-ic-nb.gv | $(PYTHON3) ${OVSDIR}/ovsdb/dot2pic -f 3) > $@.tmp && \
>   	mv $@.tmp $@
>   OVN_IC_NB_PIC = ovn-ic-nb.pic
>   OVN_IC_NB_DOT_DIAGRAM_ARG = --er-diagram=$(OVN_IC_NB_PIC)
> @@ -99,7 +99,7 @@ if HAVE_DOT
>   ovn-ic-sb.gv: ${OVSDIR}/ovsdb/ovsdb-dot.in $(srcdir)/ovn-ic-sb.ovsschema
>   	$(AM_V_GEN)$(OVSDB_DOT) --no-arrows $(srcdir)/ovn-ic-sb.ovsschema > $@
>   ovn-ic-sb.pic: ovn-ic-sb.gv ${OVSDIR}/ovsdb/dot2pic
> -	$(AM_V_GEN)(dot -T plain < ovn-ic-sb.gv | $(PYTHON) ${OVSDIR}/ovsdb/dot2pic -f 3) > $@.tmp && \
> +	$(AM_V_GEN)(dot -T plain < ovn-ic-sb.gv | $(PYTHON3) ${OVSDIR}/ovsdb/dot2pic -f 3) > $@.tmp && \
>   	mv $@.tmp $@
>   OVN_IC_SB_PIC = ovn-ic-sb.pic
>   OVN_IC_SB_DOT_DIAGRAM_ARG = --er-diagram=$(OVN_IC_SB_PIC)
>
0-day Robot Feb. 18, 2020, 6:58 p.m. UTC | #2
Bleep bloop.  Greetings Timothy Redaelli, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
WARNING: Line is 121 characters long (recommended limit is 79)
#36 FILE: utilities/ovn-ctl:95:
        ovn-appctl -t $OVN_RUNDIR/$ctl_file ovsdb-server/set-active-ovsdb-server-probe-interval $inactive_probe_to_active

WARNING: Line is 142 characters long (recommended limit is 79)
#77 FILE: utilities/ovn-ctl:932:
  --db-nb-probe-interval-to-active Active probe interval from standby to active ovsdb-server remote (default: $DB_NB_PROBE_INTERVAL_TO_ACTIVE)

WARNING: Line is 142 characters long (recommended limit is 79)
#82 FILE: utilities/ovn-ctl:937:
  --db-sb-probe-interval-to-active Active probe interval from standby to active ovsdb-server remote (default: $DB_SB_PROBE_INTERVAL_TO_ACTIVE)

WARNING: Line is 88 characters long (recommended limit is 79)
#95 FILE: utilities/ovn-ctl.8.xml:154:
    <p><code>--db-nb-probe-interval-to-active=<var>Time in milliseconds</var></code></p>

WARNING: Line is 88 characters long (recommended limit is 79)
#96 FILE: utilities/ovn-ctl.8.xml:155:
    <p><code>--db-sb-probe-interval-to-active=<var>Time in milliseconds</var></code></p>

WARNING: Line is 144 characters long (recommended limit is 79)
#107 FILE: utilities/ovn-ctl.8.xml:248:
    <p><code># ovn-ctl --db-nb-sync-from-addr=x.x.x.x --db-nb-sync-from-port=6641 --db-nb-probe-interval-to-active=60000 demote_ovnnb</code></p>

WARNING: Line is 144 characters long (recommended limit is 79)
#108 FILE: utilities/ovn-ctl.8.xml:249:
    <p><code># ovn-ctl --db-sb-sync-from-addr=x.x.x.x --db-sb-sync-from-port=6642 --db-sb-probe-interval-to-active=60000 demote_ovnsb</code></p>

WARNING: Line is 109 characters long (recommended limit is 79)
#128 FILE: utilities/ovndb-servers.ocf:31:
INACTIVE_PROBE_TO_MASTER=${OCF_RESKEY_inactive_probe_interval_to_master:-${INACTIVE_PROBE_TO_MASTER_DEFAULT}}

WARNING: Line is 92 characters long (recommended limit is 79)
#154 FILE: utilities/ovndb-servers.ocf:281:
                                --db-nb-probe-interval-to-active=${INACTIVE_PROBE_TO_MASTER}

WARNING: Line is 92 characters long (recommended limit is 79)
#159 FILE: utilities/ovndb-servers.ocf:285:
                                --db-sb-probe-interval-to-active=${INACTIVE_PROBE_TO_MASTER}

WARNING: Line is 92 characters long (recommended limit is 79)
#169 FILE: utilities/ovndb-servers.ocf:613:
                                --db-nb-probe-interval-to-active=${INACTIVE_PROBE_TO_MASTER}

WARNING: Line is 92 characters long (recommended limit is 79)
#174 FILE: utilities/ovndb-servers.ocf:617:
                                --db-sb-probe-interval-to-active=${INACTIVE_PROBE_TO_MASTER}

Lines checked: 180, Warnings: 12, Errors: 0


Please check this out.  If you feel there has been an error, please email aconole@redhat.com

Thanks,
0-day Robot

Patch
diff mbox series

diff --git a/automake.mk b/automake.mk
index 2b0bb4b12..a7947a3f5 100644
--- a/automake.mk
+++ b/automake.mk
@@ -70,7 +70,7 @@  if HAVE_DOT
 ovn-ic-nb.gv: ${OVSDIR}/ovsdb/ovsdb-dot.in $(srcdir)/ovn-ic-nb.ovsschema
 	$(AM_V_GEN)$(OVSDB_DOT) --no-arrows $(srcdir)/ovn-ic-nb.ovsschema > $@
 ovn-ic-nb.pic: ovn-ic-nb.gv ${OVSDIR}/ovsdb/dot2pic
-	$(AM_V_GEN)(dot -T plain < ovn-ic-nb.gv | $(PYTHON) ${OVSDIR}/ovsdb/dot2pic -f 3) > $@.tmp && \
+	$(AM_V_GEN)(dot -T plain < ovn-ic-nb.gv | $(PYTHON3) ${OVSDIR}/ovsdb/dot2pic -f 3) > $@.tmp && \
 	mv $@.tmp $@
 OVN_IC_NB_PIC = ovn-ic-nb.pic
 OVN_IC_NB_DOT_DIAGRAM_ARG = --er-diagram=$(OVN_IC_NB_PIC)
@@ -99,7 +99,7 @@  if HAVE_DOT
 ovn-ic-sb.gv: ${OVSDIR}/ovsdb/ovsdb-dot.in $(srcdir)/ovn-ic-sb.ovsschema
 	$(AM_V_GEN)$(OVSDB_DOT) --no-arrows $(srcdir)/ovn-ic-sb.ovsschema > $@
 ovn-ic-sb.pic: ovn-ic-sb.gv ${OVSDIR}/ovsdb/dot2pic
-	$(AM_V_GEN)(dot -T plain < ovn-ic-sb.gv | $(PYTHON) ${OVSDIR}/ovsdb/dot2pic -f 3) > $@.tmp && \
+	$(AM_V_GEN)(dot -T plain < ovn-ic-sb.gv | $(PYTHON3) ${OVSDIR}/ovsdb/dot2pic -f 3) > $@.tmp && \
 	mv $@.tmp $@
 OVN_IC_SB_PIC = ovn-ic-sb.pic
 OVN_IC_SB_DOT_DIAGRAM_ARG = --er-diagram=$(OVN_IC_SB_PIC)