Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1481386 Details for
Bug 1596678
Using permissive allow from default network policy blocks traffic
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Testing steps and logs
Testing-log.txt (text/plain), 6.47 KB, created by
Weibin Liang
on 2018-09-06 17:22:18 UTC
(
hide
)
Description:
Testing steps and logs
Filename:
MIME Type:
Creator:
Weibin Liang
Created:
2018-09-06 17:22:18 UTC
Size:
6.47 KB
patch
obsolete
>[root@ip-172-18-2-187 ~]# oc version >oc v3.9.30 >kubernetes v1.9.1+a0ce1bc657 >features: Basic-Auth GSSAPI Kerberos SPNEGO > >Server https://ip-172-18-2-187.ec2.internal:8443 >openshift v3.9.30 >kubernetes v1.9.1+a0ce1bc657 >[root@ip-172-18-2-187 ~]# oc get netnamespaces >NAME NETID EGRESS IPS >default 0 [] >install-test 12628281 [] >kube-public 9618266 [] >kube-service-catalog 7597813 [] >kube-system 12194492 [] >logging 14033439 [] >management-infra 11154999 [] >openshift 552642 [] >openshift-ansible-service-broker 13546475 [] >openshift-infra 7800087 [] >openshift-node 5017480 [] >openshift-template-service-broker 305432 [] >openshift-web-console 88241 [] >[root@ip-172-18-2-187 ~]# oc get pod -o wide -n default >NAME READY STATUS RESTARTS AGE IP NODE >docker-registry-1-n9m5s 1/1 Running 0 23m 10.128.0.3 ip-172-18-3-156.ec2.internal >docker-registry-1-xjqwr 1/1 Running 0 23m 10.129.0.3 ip-172-18-5-163.ec2.internal >registry-console-1-kmt7m 1/1 Running 0 21m 10.130.0.4 ip-172-18-2-187.ec2.internal >router-1-b8hg8 1/1 Running 0 24m 172.18.5.163 ip-172-18-5-163.ec2.internal >[root@ip-172-18-2-187 ~]# >[root@ip-172-18-2-187 ~]# oc adm create-bootstrap-project-template -o yaml > template.yaml >[root@ip-172-18-2-187 ~]# oc create -f template.yaml -n default >template "project-request" created >[root@ip-172-18-2-187 ~]# oc get template >NAME DESCRIPTION PARAMETERS OBJECTS >project-request 5 (5 blank) 5 >[root@ip-172-18-2-187 ~]# vi /etc/origin/master/master-config.yaml > >To add: >#### >projectConfig: > projectRequestTemplate: 'default/project-request' >#### > > >[root@ip-172-18-2-187 ~]# systemctl restart atomic-openshift-master-api >[root@ip-172-18-2-187 ~]# systemctl restart atomic-openshift-master-controllers >[root@ip-172-18-2-187 ~]# >[root@ip-172-18-2-187 ~]# oc edit template project-request -n default >template "project-request" edited > >To add: >#### >- apiVersion: networking.k8s.io/v1 > kind: NetworkPolicy > metadata: > name: allow-from-default-namespace > spec: > podSelector: > ingress: > - from: > - namespaceSelector: > matchLabels: > name: default >#### > > >[root@ip-172-18-2-187 ~]# oc new-project networkpolicy-testing >Now using project "networkpolicy-testing" on server "https://ip-172-18-2-187.ec2.internal:8443". > >You can add applications to this project with the 'new-app' command. For example, try: > > oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git > >to build a new example application in Ruby. >[root@ip-172-18-2-187 ~]# oc get networkpolicy -o yaml >apiVersion: v1 >items: >- apiVersion: extensions/v1beta1 > kind: NetworkPolicy > metadata: > creationTimestamp: 2018-09-06T15:17:21Z > generation: 1 > name: allow-from-default-namespace > namespace: networkpolicy-testing > resourceVersion: "13072" > selfLink: /apis/extensions/v1beta1/namespaces/networkpolicy-testing/networkpolicies/allow-from-default-namespace > uid: f3b46929-b1e7-11e8-946c-0e28605e2d2c > spec: > ingress: > - from: > - namespaceSelector: > matchLabels: > name: default > podSelector: {} > policyTypes: > - Ingress >kind: List >metadata: > resourceVersion: "" > selfLink: "" >[root@ip-172-18-2-187 ~]# > >[root@ip-172-18-2-187 ~]# oc create -f https://raw.githubusercontent.com/weliang1/Openshift_Networking/master/OSE3.3/red-pod1.json >route "red-route" created >service "red-service" created >pod "red-pod-1" created >[root@ip-172-18-2-187 ~]# oc get pods -o wide >NAME READY STATUS RESTARTS AGE IP NODE >red-pod-1 1/1 Running 0 1m 10.128.0.10 ip-172-18-3-156.ec2.internal >[root@ip-172-18-2-187 ~]# oc get pods -o wide -n default >NAME READY STATUS RESTARTS AGE IP NODE >docker-registry-1-n9m5s 1/1 Running 0 1h 10.128.0.3 ip-172-18-3-156.ec2.internal >docker-registry-1-xjqwr 1/1 Running 0 1h 10.129.0.3 ip-172-18-5-163.ec2.internal >registry-console-1-kmt7m 1/1 Running 0 1h 10.130.0.4 ip-172-18-2-187.ec2.internal >router-1-b8hg8 1/1 Running 0 1h 172.18.5.163 ip-172-18-5-163.ec2.internal >[root@ip-172-18-2-187 ~]# >[root@ip-172-18-2-187 ~]# oc project default >Now using project "default" on server "https://ip-172-18-2-187.ec2.internal:8443". >[root@ip-172-18-2-187 ~]# oc rsh router-1-b8hg8 >sh-4.2$ ping 10.128.0.10 >PING 10.128.0.10 (10.128.0.10) 56(84) bytes of data. >^C >--- 10.128.0.10 ping statistics --- >4 packets transmitted, 0 received, 100% packet loss, time 2999ms > >sh-4.2$ curl 10.128.0.10:8080 >^C >sh-4.2$ exit >exit >command terminated with exit code 130 >[root@ip-172-18-2-187 ~]# oc label namespace default name=default >namespace "default" labeled >[root@ip-172-18-2-187 ~]# oc get netnamespaces >NAME NETID EGRESS IPS >default 0 [] >install-test 12628281 [] >kube-public 9618266 [] >kube-service-catalog 7597813 [] >kube-system 12194492 [] >logging 14033439 [] >management-infra 11154999 [] >networkpolicy-testing 9794446 [] >openshift 552642 [] >openshift-ansible-service-broker 13546475 [] >openshift-infra 7800087 [] >openshift-node 5017480 [] >openshift-template-service-broker 305432 [] >openshift-web-console 88241 [] >[root@ip-172-18-2-187 ~]# oc rsh router-1-b8hg8 >sh-4.2$ ping 10.128.0.10 >PING 10.128.0.10 (10.128.0.10) 56(84) bytes of data. >64 bytes from 10.128.0.10: icmp_seq=1 ttl=64 time=1.29 ms >64 bytes from 10.128.0.10: icmp_seq=2 ttl=64 time=0.699 ms >64 bytes from 10.128.0.10: icmp_seq=3 ttl=64 time=0.636 ms >^C >--- 10.128.0.10 ping statistics --- >3 packets transmitted, 3 received, 0% packet loss, time 2001ms >rtt min/avg/max/mdev = 0.636/0.876/1.293/0.295 ms >sh-4.2$ curl 10.128.0.10:8080 >Hello Red Pod-1 Example >sh-4.2$ >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1596678
: 1481386